Skip to content

ci: add shell/json/python lint workflow - #64

Merged
VictorGSchneider merged 1 commit into
mainfrom
claude/add-ci
Apr 19, 2026
Merged

VictorGSchneider merged 1 commit into
mainfrom
claude/add-ci

Conversation

@VictorGSchneider

Copy link
Copy Markdown
Owner

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

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
VictorGSchneider marked this pull request as ready for review April 19, 2026 23:04
@VictorGSchneider
VictorGSchneider merged commit 4954996 into main Apr 19, 2026
1 check passed
@VictorGSchneider
VictorGSchneider deleted the claude/add-ci branch 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
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.

2 participants