Skip to content

Commit e2321b6

Browse files
committed
Update README (do document new task).
1 parent 9d20422 commit e2321b6

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ false`.
5555
By default, scoverage will generate reports for each project separately. You can
5656
merge them into an aggregated report by using the following:
5757

58-
```
58+
```bash
5959
$ sbt coverageAggregate
6060
```
6161

@@ -83,9 +83,6 @@ coverageExcludedFiles := ".*\\/two\\/GoodCoverage;.*\\/three\\/.*"
8383

8484
Note: The `.scala` file extension needs to be omitted from the filename, if one is given.
8585

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-
8986
You can also mark sections of code with comments like:
9087

9188
```scala
@@ -97,6 +94,16 @@ You can also mark sections of code with comments like:
9794
Any code between two such comments will not be instrumented or included in the
9895
coverage report.
9996

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+
100107
### Minimum coverage
101108

102109
Based on minimum coverage, you can fail the build with the following keys:

0 commit comments

Comments
 (0)