Skip to content

Commit

Permalink
Merge pull request #554 from jozic/support-3.X.Y-with-Y-less-than-2
Browse files Browse the repository at this point in the history
Support file and package exclusions for Scala 3.X.Y for Y < 2
  • Loading branch information
rolandtritsch committed Aug 26, 2024
2 parents 942d544 + 7d71be9 commit 708823f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/main/scala/scoverage/ScoverageSbtPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ object ScoverageSbtPlugin extends AutoPlugin {
CrossVersion
.partialVersion(scalaVersion)
.exists {
case (3, minor) if minor >= 4 && patch.exists(_ >= "2") => true
case _ => false
case (3, minor)
if minor > 4 || (minor == 4 && patch.exists(_ >= "2")) =>
true
case _ => false
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version := "0.1"

scalaVersion := "3.4.2"
scalaVersion := "3.5.0"

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

Expand Down
6 changes: 3 additions & 3 deletions src/sbt-test/scoverage/scala3-coverage-excluded-packages/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
> test
> coverageReport
# There should be no directory for the excluded package
$ exists target/scala-3.4.2/scoverage-report/GoodCoverage.scala.html
-$ exists target/scala-3.4.2/scoverage-report/two
-$ exists target/scala-3.4.2/scoverage-report/three
$ exists target/scala-3.5.0/scoverage-report/GoodCoverage.scala.html
-$ exists target/scala-3.5.0/scoverage-report/two
-$ exists target/scala-3.5.0/scoverage-report/three

0 comments on commit 708823f

Please sign in to comment.