quality/coverage-threshold/cpp
A coverage floor is enforced
Implements quality/coverage-threshold for cpp.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | cpp |
| Scope | each |
| Kind | outcome |
| Source | library v0.8.0 |
| Selected by | fleetlint-recommended@v0.8.0 |
Requirement
gcovr runs with --fail-under-line (or another --fail-under-*) in a recipe or a CI step, or a stack-neutral floor applies.
Why
A coverage number nobody enforces drifts down one “quick fix” at a time.
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
Run gcovr --fail-under-line 80 in the cover target.
Agent instruction (from quality/coverage-threshold): Add a threshold to the cover recipe with the coverage tool of the stack profile (https://fleetlint.org/stacks/), or run diff-cover –fail-under on the coverage report.
A finding that names no file points at the task runner’s file, or Makefile when there is none.
Sources
- https://fleetlint.org/baseline/#tests (convention)
- https://gcovr.com/en/stable/ (spec)
- https://fleetlint.org/stacks/#cc
Generated by fleetlint docs from catalog v0.8.0.