Skip to content

feat: add support for 2.12.16 with newest scoverage #434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name := "sbt-scoverage"

import sbt.ScriptedPlugin.autoImport.scriptedLaunchOpts

lazy val scoverageVersion = "2.0.0-M5"
lazy val scoverageVersion = "2.0.0-RC1"

inThisBuild(
List(
Expand Down
4 changes: 1 addition & 3 deletions src/main/scala/scoverage/CoverageMinimum.scala
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ object CoverageMinimum {

def all = Def.setting {
import ScoverageKeys._
val stmtTotal =
math.max(coverageMinimum.value, coverageMinimumStmtTotal.value)
All(
total = CoverageMinimum(
statement = stmtTotal,
statement = coverageMinimumStmtTotal.value,
branch = coverageMinimumBranchTotal.value
),
perPackage = CoverageMinimum(
Expand Down
3 changes: 0 additions & 3 deletions src/main/scala/scoverage/ScoverageKeys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ object ScoverageKeys {
lazy val coverageSourceRoot = settingKey[File]("the source root of the project")
// format: on

@deprecated("Use coverageMinimumStmtTotal instead", "v1.8.0")
lazy val coverageMinimum =
settingKey[Double]("see coverageMinimumStmtTotal")
lazy val coverageMinimumStmtTotal =
settingKey[Double]("scoverage minimum coverage: statement total")
lazy val coverageMinimumBranchTotal =
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/scoverage/ScoverageSbtPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ object ScoverageSbtPlugin extends AutoPlugin {
coverageEnabled := false,
coverageExcludedPackages := "",
coverageExcludedFiles := "",
coverageMinimum := 0, // default is no minimum
coverageMinimumStmtTotal := 0,
coverageMinimumBranchTotal := 0,
coverageMinimumStmtPerPackage := 0,
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/bad-coverage/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

coverageMinimum := 80
coverageMinimumStmtTotal := 80

coverageFailOnMinimum := true

Expand Down
1 change: 0 additions & 1 deletion src/sbt-test/scoverage/coverage-off/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ scalaVersion := "2.13.6"

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

coverageMinimum := 80
coverageMinimumStmtTotal := 100
coverageMinimumBranchTotal := 100
coverageMinimumStmtPerPackage := 100
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/data-dir/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ libraryDependencies += "org.specs2" %% "specs2-core" % "4.12.10" % "test"

coverageDataDir := target.value / "custom-test"

coverageMinimum := 80
coverageMinimumStmtTotal := 80

coverageFailOnMinimum := true

Expand Down
1 change: 0 additions & 1 deletion src/sbt-test/scoverage/good-coverage/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ scalaVersion := "2.13.6"

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

coverageMinimum := 80
coverageMinimumStmtTotal := 100
coverageMinimumBranchTotal := 100
coverageMinimumStmtPerPackage := 100
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/scoverage/scala3-bad/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scalaVersion := "3.2.0-RC1-bin-20220523-6783853-NIGHTLY" // TODO: Should be upda

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

coverageMinimum := 80
coverageMinimumStmtTotal := 80

coverageFailOnMinimum := true

Expand Down
1 change: 0 additions & 1 deletion src/sbt-test/scoverage/scala3-good/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ scalaVersion := "3.2.0-RC1-bin-20220523-6783853-NIGHTLY" // TODO: Should be upda

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

coverageMinimum := 80
coverageMinimumStmtTotal := 100
coverageMinimumBranchTotal := 100
coverageMinimumStmtPerPackage := 100
Expand Down