fleetlint Policy for a fleet of repositories
v0.8
Getting started

quality/coverage-threshold/any

A coverage floor is enforced

The stack-neutral implementation of quality/coverage-threshold: it checks stacks without an implementation of their own and repositories where no stack is detected, and its satisfiers count for every stack.

Severitywarning
Tiers1, 2
Stacksany
Scopeeach
Kindoutcome
Sourcelibrary v0.5.0
Selected byfleetlint-recommended@v0.5.0

Requirement

The cover recipe (of the scope’s task runner or a parent Makefile) compares coverage with a minimum (a fail-under option, a COVER_MIN comparison), diff-cover runs with --fail-under, or a codecov.yml here or in a parent directory sets a status target. Comments and echo lines do not count.

Why

A coverage number nobody enforces drifts down one “quick fix” at a time.

Applies when

repo.stacks.size() > 0

Parameters

  • runners: [../Makefile ../justfile ../Justfile ../Taskfile.yml ../Taskfile.yaml ../../Makefile ../../justfile ../../Justfile ../../Taskfile.yml ../../Taskfile.yaml ../../../Makefile ../../../justfile ../../../Justfile ../../../Taskfile.yml ../../../Taskfile.yaml]
  • 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

Make make cover fail below the floor (diff-cover –fail-under=80 is the stack-neutral option).

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 taskrunner.file != "" ? taskrunner.file : "Makefile" yields.

Sources


Generated by fleetlint docs from catalog v0.5.0.