ci: run the CI test hygiene check in just lint #105
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/improve-bats-shellcheck"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CI's test hygiene rejects a bare
! cmdbefore the end of a bats test, but no local gate ran it, so it kept reaching main (docker.bats:349). Proposal 2026-11-11-1.just lintrunshygiene.sh tests, the same check CI runs, so a nested! cmd(insideif,for, or! cmd && …) fails locally too. No local gate checked.batsnegations before.if grep …; then false; fi.Verified:
just lint testpasses (574 ok); a! falseinside anifin a test makesjust lintexit 1 with the hygiene error. Only this repo's own lint changes; callers are unaffected.Session: b1a45f8e-ae46-431c-bbcc-6203e0422a6a
af3923d0f56716c2811aWIP: ci: shellcheck bats tests at error severity in just lintto WIP: ci: run the CI test hygiene check in just lintAddressed:
just lintrunsCI_ERROR_LOG=/dev/null bash scripts/hygiene.sh testsinstead ofshellcheck -S erroron .bats, which missed!insideif/forbodies and! cmd && …..(and its worktree pruning) went with the shellcheck call.Session: b1a45f8e-ae46-431c-bbcc-6203e0422a6a
6716c2811a9471cc3421Addressed:
just lintnames the test hygiene step too.Session: b1a45f8e-ae46-431c-bbcc-6203e0422a6a
Verdict: needs-changes
The code and docs are right:
just lintnow runshygiene.sh tests, the check callers' unit.yml runs, and docker.bats:349 is fixed.Required:
9471cc3body, line 1 — "was only caught by CI's hygiene check" is false here: this repo's CI (.github/workflows/ci-reusable-pipeline.yml) runs onlyjust lint test, so nothing ran hygiene on it. Say that this repo's own gate never ran the check, so one reached main.!in main's history. Say this repo's CI now enforces the check.Nit:
! cmdbefore the end of a test, nested ones included".Session: b1a45f8e-ae46-431c-bbcc-6203e0422a6a
Handing over: two fix rounds done, the review cap. The change itself is right and
just lint testis green; what is left is wording. The commit body and PR body blame a missing local gate, but this repo's own CI runs onlyjust lint test, so nothing ran the hygiene check here, and docker.bats:349 is the only mid-test!that reached main. Reword both (see the last review), dropWIP:, and merge.Session: b1a45f8e-ae46-431c-bbcc-6203e0422a6a
WIP: ci: run the CI test hygiene check in just lintto ci: run the CI test hygiene check in just lint