Skip to content

Commit 12aac64

Browse files
rolandtritschckipp01
authored andcommitted
PR feedback: Restore current behaviour (for excludedFiles).
1 parent 7aa67e7 commit 12aac64

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ instrumented or included in the coverage report.
7878
You can also exclude files and file paths.
7979

8080
```scala
81-
coverageExcludedFiles := ".*\\/two\\/GoodCoverage\.scala;.*\\/three\\/.*"
81+
coverageExcludedFiles := ".*\\/two\\/GoodCoverage;.*\\/three\\/.*"
8282
```
8383

84-
Note: This only works for Scala2. Right now Scala3 does not support
84+
Note: The `.scala` file extension needs to be omitted from the filename, if one is given.
85+
86+
Note: These two options only work for Scala2. Right now Scala3 does not support
8587
a way to exclude packages or files from being instrumented.
8688

8789
You can also mark sections of code with comments like:

src/sbt-test/scoverage/coverage-excluded-files/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ scalaVersion := "2.13.6"
44

55
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test
66

7-
coverageExcludedFiles := ".*\\/two\\/GoodCoverage\\.scala"
7+
coverageExcludedFiles := ".*\\/two\\/GoodCoverage"
88

99
resolvers ++= {
1010
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT")))

src/sbt-test/scoverage/scala3-coverage-excluded-files/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ scalaVersion := "3.2.0-RC1"
44

55
libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test
66

7-
coverageExcludedFiles := ".*\\/two\\/GoodCoverage\\.scala"
7+
coverageExcludedFiles := ".*\\/two\\/GoodCoverage"
88

99
resolvers ++= {
1010
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT")))

0 commit comments

Comments
 (0)