Skip to content

Commit 708823f

Browse files
Merge pull request #554 from jozic/support-3.X.Y-with-Y-less-than-2
Support file and package exclusions for Scala 3.X.Y for Y < 2
2 parents 942d544 + 7d71be9 commit 708823f

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/main/scala/scoverage/ScoverageSbtPlugin.scala

+4-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ object ScoverageSbtPlugin extends AutoPlugin {
9393
CrossVersion
9494
.partialVersion(scalaVersion)
9595
.exists {
96-
case (3, minor) if minor >= 4 && patch.exists(_ >= "2") => true
97-
case _ => false
96+
case (3, minor)
97+
if minor > 4 || (minor == 4 && patch.exists(_ >= "2")) =>
98+
true
99+
case _ => false
98100
}
99101
}
100102

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version := "0.1"
22

3-
scalaVersion := "3.4.2"
3+
scalaVersion := "3.5.0"
44

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

src/sbt-test/scoverage/scala3-coverage-excluded-packages/test

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
> test
55
> coverageReport
66
# There should be no directory for the excluded package
7-
$ exists target/scala-3.4.2/scoverage-report/GoodCoverage.scala.html
8-
-$ exists target/scala-3.4.2/scoverage-report/two
9-
-$ exists target/scala-3.4.2/scoverage-report/three
7+
$ exists target/scala-3.5.0/scoverage-report/GoodCoverage.scala.html
8+
-$ exists target/scala-3.5.0/scoverage-report/two
9+
-$ exists target/scala-3.5.0/scoverage-report/three

0 commit comments

Comments
 (0)