Skip to content

ci: add Bash parse-only syntax gate for tracked scripts/*.sh - #115

Merged
bketelsen merged 1 commit into
mainfrom
cockpit/worker-710c5db032830637
Aug 24, 2026
Merged

ci: add Bash parse-only syntax gate for tracked scripts/*.sh#115
bketelsen merged 1 commit into
mainfrom
cockpit/worker-710c5db032830637

Conversation

@bketelsen

Copy link
Copy Markdown
Contributor

Summary

  • Adds scripts/check-scripts.mjs, a least-complexity bash -n parse-only check over every git ls-files scripts/*.sh tracked script.
  • Wires it into the root check gate: npm run verify now runs check:docs && check:organization && check:scripts && npm test, which is what .github/workflows/ci.yml's docs-gate job invokes via npm run check.
  • Adds test/check-scripts.test.mjs: one regression test copies the repo's three current tracked scripts into a git-initialized fixture and asserts bash_syntax: 3/3 passes; a second test writes a script with unmatched if/fi and asserts the gate fails with FAIL syntax: scripts/broken.sh.
  • No script behavior was changed — parse-only, no execution.

Test plan

  • npm run check at the repository root — all 13 tests pass (docs-gate, organization, new check:scripts, and existing suites), exit 0.
  • Docs-site scaffold suite (cd .agents/skills/frostyard-docs-site/scaffold && npm test) — 6/6 tests pass, exit 0.

🤖 Generated with Claude Code

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>
@bketelsen
bketelsen marked this pull request as ready for review August 24, 2026 23:05
@bketelsen
bketelsen added this pull request to the merge queue Aug 24, 2026
Merged via the queue into main with commit 3329290 Aug 24, 2026
2 checks passed
@bketelsen
bketelsen deleted the cockpit/worker-710c5db032830637 branch August 24, 2026 23:06
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