Skip to content

Conversation

@raylras
Copy link

@raylras raylras commented Oct 26, 2024

Add support for JavaScript language and its dialects (TypeScript, etc.).

Note that the JavaScript plugin dependency does not exist in IC (IDEA Community), but in WebStorm or IU (IDEA Ultimate).

Todo List:

  • Unit Test

@raylras
Copy link
Author

raylras commented Oct 26, 2024

The complexity can be displayed, but the percentages don't seem quite accurate.
As a JavaScript/TypeScript newbie, I might need some help with this PR.

@nikolaikopernik
Copy link
Owner

nikolaikopernik commented Oct 27, 2024

Hi @raylras
Thank you for your interest in this project and the effort to add JS support. I'm also not a JS engineer so cannot help you with the language specifics. However, in order to calculate complexity you mostly need to work with the tree of PsiElements. It involves a lot of debugging.
So to continue I would suggest you :

This will be a good indication of how accurate you implemented a complexity score. After that it's just a lot of debugging of PsiElements structures for JS in order to fit the expected complexity.

Also would suggest you to start with a single dialect first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants