Support JavaScript/ECMAScript
As of the writing of this issue, only Java & C/C++ are supported languages. Please add support for JavaScript/ECMAScript, including support for Node.js. I imagine TypeScript could be in this conversation as well.
That's gonna be a tough one though. JavaScript is a dynamic language, and as such pretty hard to statically analyze. Any starting points?
There are couple static code analysis tools like plato, scrlib, tern, checkmarx,.. but I am not sure if they work in a way thy could help you.
+1 for Typescript. Support for this would make me a customer.
There is also Flowtype, but it has a smaller following.
+1 for JavaScript by mail
+1 for JavaScript by mail
+1 for JavaScript by mail
+1 for JavaScript by mail
+1 via mail
any news on this?
We are currently working on a little project to make it easier to add new language support to Sourcetrail. I will let you know when it's ready.
Since we cannot keep up with language requests, we created the SourcetrailDB library to allow anyone to write custom indexers and extend language support for Sourcetrail.
If you are interested in writing an indexer for JavaScript, please let us know!
I'm interested in writing an indexer for JavaScript
Awesome, please take a look at our Language Extension Guide! @LouisStAmour is already heavily working on Typescript support (see https://github.com/CoatiSoftware/SourcetrailDB/issues/2)
Just like how VS Code uses TypeScript to provide type checking and completions for JavaScript, it's possible once we get TypeScript support up and running, we'll have JavaScript support for free. https://code.visualstudio.com/docs/nodejs/working-with-javascript
https://github.com/CoatiSoftware/Sourcetrail/issues/750 might be the way to go
Any forward on this? I gave this app a zip around in a supported language and it was quite nice, but unfortunately my work involves C# and JavaScript... so it's sad to see there is no support for it.
I think its also will help to trace frontend framework
Has there been any advances in this area? Really much looking forward to work with Sourcetrail in our project https://github.com/TheIOFoundation/ProjectLockdown
(I wish I could help with this feature; I lack the necessary skills.)
Reading though the language extension guide, writing an AST visitor doesn't sound too difficult. There are lots of parsers out and related traversal functions. I'd probably start with @babel/parser and @babel/traverse.
The hard part (as mentioned in the guide) is determining which method definition is to reference for a particular method call. This is where supporting TypeScript should be easier since it already has all that info when things are properly typed (not using any).