quality/coverage-threshold/kotlin
A coverage floor is enforced
Implements quality/coverage-threshold for kotlin.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | kotlin |
| Scope | each |
| Kind | outcome |
| Source | library v0.5.0 |
| Selected by | fleetlint-recommended@v0.5.0 |
Requirement
JaCoCo’s check goal with a <minimum> in pom.xml, JaCoCo violationRules (jacocoTestCoverageVerification) or Kover minBound verification in a Gradle build, or a stack-neutral floor applies.
Why
A coverage number nobody enforces drifts down one “quick fix” at a time.
Parameters
skip:^\s*[@+-]*\s*(\{\{[^}]*\}\}\s*|\$[({][A-Za-z_]+[)}]\s*)?(#|//|echo\b|printf\b|(sudo\s+)?(go (install|get)|cargo b?install|pipx? install|pip3 install|python3? -m pip install|uv (tool |pip )?(install|add)|(npm|pnpm|yarn|bun) (i|install|add|global add)|gem install|bundle add|brew install|dotnet tool (install|update)|composer (global )?require|apt(-get)? install|curl|wget)\b[^;&]*$)
Fix
Add a Kover (or JaCoCo) verification rule with a minimum and run its verify task in cover.
Agent instruction: Add a threshold to the cover recipe using the stack profile’s tool (go: go-test-coverage or a cover script with a minimum; python: –cov-fail-under; node: coverageThreshold; rust: cargo llvm-cov –fail-under-lines; kotlin: kover verify).
A finding of this rule points at the file (["build.gradle.kts", "build.gradle"].filter(f, file(f)) + ["build.gradle.kts"])[0] yields.
Sources
- https://fleetlint.org/baseline/#tests (convention)
- https://www.jacoco.org/jacoco/trunk/doc/check-mojo.html (spec)
- https://kotlin.github.io/kotlinx-kover/gradle-plugin/ (spec)
- https://fleetlint.org/stacks/#kotlin-jvm–android
Generated by fleetlint docs from catalog v0.5.0.