Repository navigation
test(standards): fail when markdownlint.json drifts from dotfiles - #202
Merged
Merged
Conversation
standards/markdownlint.json and dotfiles' canonical markdownlint-cli/.markdownlint.json are kept in step by hand, and nothing checked them. The commit gate lints with the dotfiles copy and standards-check with this one, so drift means local and CI disagree. tests/test-markdownlint-drift.sh compares the two with jq -S. It fetches the dotfiles copy from raw.githubusercontent.com (main), or reads MARKDOWNLINT_DOTFILES_CONFIG. If it cannot read either, it fails rather than skips. A built-in control proves a flipped rule is caught. tests/ has no CI job here, so self-review.yml gains a markdownlint-drift job that runs only this file (curl and jq ship on the runner). It is not a required check. dotfiles carries the mirror test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tests/test-markdownlint-drift.shfails whenstandards/markdownlint.jsondiffers from dotfiles' canonicalmarkdownlint-cli/.markdownlint.jsonon main. It compares withjq -S.raw.githubusercontent.com(dotfiles is public), orMARKDOWNLINT_DOTFILES_CONFIGwhen set.CI
Nothing in this repo's CI ran
tests/before; only standards-check and the checkout guardrail did. This PR adds amarkdownlint-driftjob toself-review.ymlthat runs only this file. It needs only curl and jq, which ubuntu-latest has. It is not a required check, and this PR does not change branch protection.tests/run-tests.shalso picks the file up locally.The checkout guardrail in the same workflow scans only the two dependabot-auto-merge workflows, and
self-review.ymltriggers onpull_request, so the new job'sactions/checkoutstep does not touch that guardrail.Known-bad runs (local)
MARKDOWNLINT_DOTFILES_CONFIGnames a missing file: FAIL.The mirror test lands in smartwatermelon/dotfiles (
bash/tests/test-markdownlint-config-drift.sh).