Skip to content

Commit bfb3321

Browse files
committed
Add different log message for 100% coverage
1 parent a07bfc5 commit bfb3321

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/scala/scoverage/ScoverageSbtPlugin.scala

+5-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ class ScoverageSbtPlugin extends sbt.Plugin {
145145

146146
// check for default minimum
147147
if (min > 0) {
148-
if (min > coverage.statementCoveragePercent) {
148+
def is100(d: Double) = Math.abs(100 - d) <= 0.00001
149+
150+
if (is100(min) && is100(coverage.statementCoveragePercent)) {
151+
s.log.info(s"[scoverage] 100% Coverage !")
152+
} else if (min > coverage.statementCoveragePercent) {
149153
s.log.error(s"[scoverage] Coverage is below minimum [${coverage.statementCoverageFormatted}% < $min%]")
150154
if (failOnMin)
151155
throw new RuntimeException("Coverage minimum was not reached")

0 commit comments

Comments
 (0)