How to use npm package of SONARJS

85 Views Asked by At

I'm wondering how to get complexity metrics for my JS functions. I've tried to run the package against my application, but had only several code style warnings. I'm pretty confident I should be warned about complexity in several cases. Is there a special flag for this feature?

1

There are 1 best solutions below

0
On

https://www.npmjs.com/package/sonarjs only returns issues, no metrics (use SonarQube for metrics).

While there are as well rules for complexity, unfortunately they are not activated and there is no way to activate them yet (here is the list of activated rules).

Welcome to create an issue for the feature https://github.com/SonarSource/sonarjs-cli/issues/new