Skip to content

Commit

Permalink
PR feedback: Restore current behaviour (for excludedFiles).
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandtritsch authored and ckipp01 committed Jul 5, 2022
1 parent 7aa67e7 commit 12aac64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ instrumented or included in the coverage report.
You can also exclude files and file paths.

```scala
coverageExcludedFiles := ".*\\/two\\/GoodCoverage\.scala;.*\\/three\\/.*"
coverageExcludedFiles := ".*\\/two\\/GoodCoverage;.*\\/three\\/.*"
```

Note: This only works for Scala2. Right now Scala3 does not support
Note: The `.scala` file extension needs to be omitted from the filename, if one is given.

Note: These two options only work for Scala2. Right now Scala3 does not support
a way to exclude packages or files from being instrumented.

You can also mark sections of code with comments like:
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/coverage-excluded-files/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scalaVersion := "2.13.6"

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

coverageExcludedFiles := ".*\\/two\\/GoodCoverage\\.scala"
coverageExcludedFiles := ".*\\/two\\/GoodCoverage"

resolvers ++= {
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scalaVersion := "3.2.0-RC1"

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

coverageExcludedFiles := ".*\\/two\\/GoodCoverage\\.scala"
coverageExcludedFiles := ".*\\/two\\/GoodCoverage"

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

0 comments on commit 12aac64

Please sign in to comment.