Add lint CI gate: shellcheck, shfmt, actionlint, yaml #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/lint-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds the static-analysis gate codex-1's audit flagged as P1 hardening.
test.ymlalready gates behavior (offline unit suite + e2e docker build); this adds a.forgejo/workflows/lint.ymlthat gates form.Four checks, all strict (any issue fails the job):
shellcheckon the shell scriptsshfmt -i 2 -ci -d(formatting)actionlinton the workflowsyqparse ofaction.yml, the workflows, and the example workflowsThis mirrors the existing Makefile
linttarget but strict: the Makefile masks tool failures with|| echo skipping, so it is a local convenience, not a gate. That leniency is why two files had drifted from shfmt; the first commit here normalizes them (spaces around case-pattern pipes, subshell parens, one stray blank line, no behavior change) so the tree is clean, and the unit suite still passes 46/46.Runner and tooling:
runs-on: [self-hosted, Linux], notubuntu-latest. The audit note said ubuntu-latest, but the fleet has no runner with that label (the same gap the mission-control audit found), so such a job would sit unpicked. Every fleet workflow, including this repo's owntest.ymland examples, uses[self-hosted, Linux].~/.local/bin(shellcheck 0.10.0, shfmt 3.13.1, actionlint 1.7.7, yq latest), so the gate is deterministic and needs no runner preinstalls or root.Verified locally: all four linters clean, and the repo's own pre-commit hook (which runs the same four plus the unit suite) passes on both commits.