Repository navigation
Commit ff8f821
authored
ci: add shell/json/python lint workflow (#64)
## 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_017cykH875moQgptoFGxfQai1 file changed
Lines changed: 94 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
0 commit comments