File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 44
55Plugin for [ SonarQube] that imports statement coverage generated by [ Scoverage] for Scala projects.
66
7+ Scoverage measures how many statements of a given Scala program have been covered by automated tests. This
8+ new metric is much better for Scala than traditional line coverage and branch coverage because typically:
9+
10+ 1 . There are many statements on a single line
11+ 2 . ` if ` statements are used rarely
12+
13+ This plugin reads XML report generated by Scoverage and populates several metrics in Sonar:
14+
15+ 1 . Total number of statements
16+ 2 . Number of statements covered by tests
17+ 3 . Statement coverage rate (%)
18+
19+ Projects with sub-projects are supported as well. Overall statement coverage is (sum of number of covered statements
20+ for all sub-projects) / (total number of statements for all sub-projects). In other words, it's more intelligent than
21+ just plain average of coverage rates for sub-projects.
22+
723## Requirements ##
824
925- [ SonarQube] 4.0
@@ -28,11 +44,11 @@ root directory:
2844If your project is based on SBT and you're using [ Scoverage plugin for SBT] [ sbt-scoverage] you can
2945generate the Scoverage report by executing following from command line:
3046
31- sbt clean scoverage:test
47+ $ sbt clean scoverage:test
3248
3349And then run Sonar runner to upload the report to the Sonar server:
3450
35- sonar-runner
51+ $ sonar-runner
3652
3753## Add statement coverage columns ##
3854
You can’t perform that action at this time.
0 commit comments