Sonar Code Coverage Metric


(Akash) #1

Do we have coverage metrics for sonarqube. Current code coverage shows how much lines are covered by unit test cases.
It would be great if we have sonar rule coverage which shows how many lines have been scanned by sonar in the complete project.

Say for example, project contains 100 lines of code and we have skipped a module which contains 20 lines. So sonar code coverage should show as 80% (100-20 lines)


(Colin Mueller) #2

Greetings Akash,

The default behavior of SonarQube is to scan all relevant (not third-party or generated) code. In what situations is code being skipped that isn’t intentional (defining exclusions, etc.)

Best regards,

Colin


(Akash) #3

Can we get some kind of metrics?