ci: add Bash parse-only syntax gate for tracked scripts/*.sh - #115
Merged
Conversation
Adds scripts/check-scripts.mjs to the root check gate (npm run verify), running `bash -n` over every git-tracked scripts/*.sh file so a malformed script fails CI before merge. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
scripts/check-scripts.mjs, a least-complexitybash -nparse-only check over everygit ls-files scripts/*.shtracked script.npm run verifynow runscheck:docs && check:organization && check:scripts && npm test, which is what.github/workflows/ci.yml'sdocs-gatejob invokes vianpm run check.test/check-scripts.test.mjs: one regression test copies the repo's three current tracked scripts into a git-initialized fixture and assertsbash_syntax: 3/3passes; a second test writes a script with unmatchedif/fiand asserts the gate fails withFAIL syntax: scripts/broken.sh.Test plan
npm run checkat the repository root — all 13 tests pass (docs-gate,organization, newcheck:scripts, and existing suites), exit 0.cd .agents/skills/frostyard-docs-site/scaffold && npm test) — 6/6 tests pass, exit 0.🤖 Generated with Claude Code