Reputation: 2107
I am kinda newbie in using Sonar and plugins for javascript code coverage.
Which are the possibilities to find out the quality (including code coverage) of javascript code when analyzed with Sonar?
Currently I am using karma runner which delivers a code coverage report. Is it possible to use it in Sonar?
Thanks.
Upvotes: 5
Views: 11807
Reputation: 885
The following discussion covers setting up SonarQube for a javascript project: https://community.sonarsource.com/t/sonarcloud-analysis-for-javascript-application/10591/3
I just went through the process for the first time. The key is getting the lcov.info file, which Elena mentioned can be produced by Karma. The following setting causes the coverage info to be published to your SonarQube project:
sonar.javascript.lcov.reportPaths=coverage/lcov.info
Note the path is relative to the project root.
Upvotes: 3
Reputation: 1090
Upvotes: 0