-
Notifications
You must be signed in to change notification settings - Fork 55
Closed as not planned
Labels
BugBug issue typeBug issue typeS: postponedStatus: work on the issue is not in the short term plansStatus: work on the issue is not in the short term plans
Description
It seems to me as if the Jacoco Ant task to check for coverage get's the percent value of the coverage reported, while it needs to work with the floating point value. Anyways, this is what I see:
> Task :my-component:app:koverLog
[ant:jacocoReport] Rule violated for bundle :app: lines covered ratio is 0.2664, but expected minimum is 1.0000
> Task :my-component:app:koverPrintCoverage
:app line coverage: 26.64%The expected coverage for this module is 28%, with a threshold of 5%, i.e.
val minBound = (expected - threshold).coerceAtLeast(0)
val maxBound = (expected + threshold).coerceAtMost(100)
so the minBound should be 23 and the maxBound should be 33. The extension is then configured like this:
koverReport {
verify {
rule {
minBound(minBound)
maxBound(maxBound)
}
}
}
The koverVerify task also runs through as expected, just the log output is confusing.
Environment
- Kover Gradle Plugin version: 0.7.6-SNAPSHOT
- Gradle version: 8.5
- Kotlin project type: Kotlin/Android
- Coverage Toolset: JaCoCo("0.8.11")
Metadata
Metadata
Assignees
Labels
BugBug issue typeBug issue typeS: postponedStatus: work on the issue is not in the short term plansStatus: work on the issue is not in the short term plans