taskrunner/check-composition
check runs the gates and excludes bench and release
| Severity | warning |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.6.0 |
| Selected by | fleetlint-recommended@v0.6.0 |
Requirement
check runs lint and test, as prerequisites, through targets it depends on (up to three levels) or by invoking them in its recipe ($(MAKE) lint test, just lint), and never bench or release. Cover, audit and build belong in it too, but are not checked here.
Why
check is the definition of green. A check that is slow or flaky gets bypassed, and a bypassed gate is worse than none; benchmarks are noisy and release is a deliberate act.
Applies when
taskrunner.kind in ["make", "just", "task"] && "check" in taskrunner.targetsCheck
[("check" in taskrunner.deps ? taskrunner.deps["check"] : []) + ("check" in taskrunner.recipes
? taskrunner.targets.filter(t, taskrunner.recipes["check"].exists(l,
l.matches("(\\$\\(MAKE\\)|\\$\\{MAKE\\}|\\bmake\\b|\\bjust\\b|\\btask\\b)[^;&|]*\\s" + t + "(\\s|$)")))
: [])].exists(d1,
[d1 + d1.map(d, d in taskrunner.deps ? taskrunner.deps[d] : []).flatten()].exists(d2,
[d2 + d2.map(d, d in taskrunner.deps ? taskrunner.deps[d] : []).flatten()].exists(all,
["lint", "test"].all(t, t in all) && !("bench" in all) && !("release" in all))))Fix
Make check depend on lint, test, cover, audit and build, and move bench/release out.
Agent instruction: Rewrite the check target’s prerequisites to lint test cover audit build; keep bench and release as separate targets.
A finding of this rule points at the file taskrunner.file != "" ? taskrunner.file : "Makefile" yields.
Sources
- https://fleetlint.org/baseline/#task-runner-contract (convention)
Generated by fleetlint docs from catalog v0.6.0.