Repository navigation
ci: add shell/json/python lint workflow - #64
Merged
Merged
Conversation
Runs on pull_request and push to main. Checks: - bash -n syntax on every *.sh (vendor excluded) - shellcheck --severity=error on every *.sh (floor raised later) - python3 json.load on every *.json - python3 -m py_compile on every *.py Vendored upstream code under scripts/vendor/** is skipped — forward-port bug fixes upstream-first; our CI should not gate on it. https://claude.ai/code/session_017cykH875moQgptoFGxfQai
VictorGSchneider
marked this pull request as ready for review
April 19, 2026 23:04
VictorGSchneider
added a commit
that referenced
this pull request
May 9, 2026
## Summary Adds `.github/workflows/ci.yml` — a minimal lint workflow that runs on every `pull_request` and on `push` to `main`. Checks (vendor excluded — `scripts/vendor/**` is forward-ported upstream-first): - **Shell syntax**: `bash -n` on every `*.sh` - **Shellcheck**: `--severity=error` only (keeps the signal high; raise the floor to `warning` once the tree is clean) - **JSON**: `python3 json.load` on every `*.json` - **Python**: `python3 -m py_compile` on every `*.py` All four checks pass locally on the current `main` (34 shell scripts, 5 JSON files, 2 Python files). ## Why `--severity=error` and not stricter Shellcheck at `warning` or `info` produces a lot of style noise on an established shell codebase. Starting at `error` catches real bugs (unquoted expansions that will break at runtime, wrong variable references, etc.) without blocking day-to-day PRs. The comment in the workflow flags this as an explicit choice to tighten later. ## Test plan - [ ] Open this PR → verify the `lint (shell / json / python)` job runs and passes. - [ ] Intentionally break a shell script on a throwaway branch (`bash -n` error) → verify CI fails. - [ ] Intentionally break a JSON file → verify CI fails with `::error file=...::invalid JSON`. - [ ] Confirm `scripts/vendor/brcs/BRCS.sh` is **not** linted (adding a syntax error there should be ignored by CI). https://claude.ai/code/session_017cykH875moQgptoFGxfQai
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
Adds
.github/workflows/ci.yml— a minimal lint workflow that runs on everypull_requestand onpushtomain.Checks (vendor excluded —
scripts/vendor/**is forward-ported upstream-first):bash -non every*.sh--severity=erroronly (keeps the signal high; raise the floor towarningonce the tree is clean)python3 json.loadon every*.jsonpython3 -m py_compileon every*.pyAll four checks pass locally on the current
main(34 shell scripts, 5 JSON files, 2 Python files).Why
--severity=errorand not stricterShellcheck at
warningorinfoproduces a lot of style noise on an established shell codebase. Starting aterrorcatches real bugs (unquoted expansions that will break at runtime, wrong variable references, etc.) without blocking day-to-day PRs. The comment in the workflow flags this as an explicit choice to tighten later.Test plan
lint (shell / json / python)job runs and passes.bash -nerror) → verify CI fails.::error file=...::invalid JSON.scripts/vendor/brcs/BRCS.shis not linted (adding a syntax error there should be ignored by CI).https://claude.ai/code/session_017cykH875moQgptoFGxfQai