Skip to content

docs: lint the same files CI does, then make CI keep them level - #32

Merged
d6veteran merged 1 commit into
mainfrom
fix/contributing-lints-what-ci-lints
Jul 31, 2026
Merged

docs: lint the same files CI does, then make CI keep them level#32
d6veteran merged 1 commit into
mainfrom
fix/contributing-lints-what-ci-lints

Conversation

@d6veteran

Copy link
Copy Markdown
Collaborator

CONTRIBUTING.md says to run shellcheck locally "because it runs in CI, so running them locally saves a round trip", then lists five files. ci.yml:21 lints six.

CI:           ... scripts/generate-agents.sh tests/run.sh tests/check-links.sh
CONTRIBUTING: ... scripts/generate-agents.sh tests/run.sh

So a contributor could follow the documented steps exactly, see a silent shellcheck, push, and fail the lint job on a file they were never told to check. A doc that is wrong about how to pass CI is worse than no doc, because it is the one people trust.

Why this is not a one-line fix

Correcting the list alone leaves the two free to drift apart again. That is the same shape as the false "installs as a plugin in one step" claim, which was corrected in README.md and left standing in ROADMAP.md for weeks because the fix was scoped to the file where someone noticed it. CONTRIBUTING.md:51 names that incident as the reason to fix the claim rather than the file.

So both lists are now read from the file that owns them and compared as sets. Neither can be updated alone.

A third assertion checks that every listed file exists. Two lists that agree with each other but no longer match the repo is precisely the failure a set comparison structurally cannot catch, so it needs its own check. This mirrors the reasoning already recorded at tests/run.sh:1290.

Verification

296/296 pass, shellcheck clean on all six files.

Mutation-tested per CONTRIBUTING.md:82 ("A test that cannot fail is not a test"):

Mutation Result
Revert CONTRIBUTING to the five-file list, the bug this fixes CONTRIBUTING lints the same files CI does red, reporting only in CI: tests/check-links.sh
Make both lists agree on a file that does not exist every file in the shellcheck list exists red, reporting missing: tests/gone.sh

The second row is the one worth noting: it goes red while the parity check stays green, which is the point of having both.

🤖 Generated with Claude Code

CONTRIBUTING told contributors to run shellcheck locally "because it runs in
CI, so running it here saves a round trip", then listed five files where CI
lints six. tests/check-links.sh was missing. A contributor could follow the
documented steps exactly, see a silent shellcheck, push, and fail the lint job
on a file they were never told to check. A doc that is wrong about how to pass
CI is worse than no doc, because it is trusted.

Correcting the list alone would leave the two free to drift apart again, which
is the same shape as the false install-path claim that was fixed in README and
left standing in ROADMAP for weeks. So both lists are now read from the file
that owns them and compared as sets, and neither can be updated alone.

A third assertion checks that every listed file exists. Two lists that agree
with each other but no longer match the repo is the failure a set comparison
structurally cannot catch, so it needs its own check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@d6veteran
d6veteran merged commit ea86d67 into main Jul 31, 2026
4 checks passed
@d6veteran
d6veteran deleted the fix/contributing-lints-what-ci-lints branch July 31, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant