File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ false`.
55
55
By default, scoverage will generate reports for each project separately. You can
56
56
merge them into an aggregated report by using the following:
57
57
58
- ```
58
+ ``` bash
59
59
$ sbt coverageAggregate
60
60
```
61
61
@@ -83,9 +83,6 @@ coverageExcludedFiles := ".*\\/two\\/GoodCoverage;.*\\/three\\/.*"
83
83
84
84
Note: The ` .scala ` file extension needs to be omitted from the filename, if one is given.
85
85
86
- Note: These two options only work for Scala2. Right now Scala3 does not support
87
- a way to exclude packages or files from being instrumented.
88
-
89
86
You can also mark sections of code with comments like:
90
87
91
88
``` scala
@@ -97,6 +94,16 @@ You can also mark sections of code with comments like:
97
94
Any code between two such comments will not be instrumented or included in the
98
95
coverage report.
99
96
97
+ Note: This only works for scala2. To make this work for scala3 you have to use
98
+ the ` coverageExclude ` task.
99
+
100
+ ``` bash
101
+ $ sbt clean coverage test coverageExclude coverageReport
102
+ ```
103
+
104
+ Note: This will take ` excludedPackages ` and ` excludedFiles ` into consideration,
105
+ but not lines of code that are excluded with ` COVERAGE-OFF/-ON ` .
106
+
100
107
### Minimum coverage
101
108
102
109
Based on minimum coverage, you can fail the build with the following keys:
You can’t perform that action at this time.
0 commit comments