Skip to content

fix(build): make sa actually fail on shellcheck findings#815

Merged
Chemaclass merged 1 commit into
mainfrom
fix/make-sa-exit-code
Jul 16, 2026
Merged

fix(build): make sa actually fail on shellcheck findings#815
Chemaclass merged 1 commit into
mainfrom
fix/make-sa-exit-code

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

make sa used find -exec shellcheck {} \;, and find swallows the command's exit code — the target printed findings yet always reported OK. Real findings (SC1087/SC2034 in #813) sailed through the local gate and only failed in CI.

💡 Changes

  • Run shellcheck one file per invocation via xargs -n 1 -P 4, which propagates failures (verified: a bad probe file now fails the target; clean tree passes in ~6s).
  • Mirror CI's SHELLCHECK_OPTS excludes so the local and CI gates check the same thing.
  • Per-file invocation also sidesteps a shellcheck 0.11.0 crash (GHC pattern-match failure) on multi-file batches with -x.

'find -exec shellcheck {} \;' swallows shellcheck's exit code — find returns 0
regardless of findings, so 'make sa' printed warnings yet reported OK and let
them through to CI (which then failed on SC1087/SC2034 that the local gate had
'passed'). Run one file per invocation via xargs, which propagates failures;
-P 4 keeps it ~6s. The excludes mirror CI's SHELLCHECK_OPTS so both gates
check the same thing. One file per invocation also sidesteps a shellcheck
0.11.0 crash (GHC pattern-match failure) on multi-file batches with -x.
@Chemaclass Chemaclass added the bug Something isn't working label Jul 16, 2026
@Chemaclass Chemaclass self-assigned this Jul 16, 2026
@Chemaclass
Chemaclass merged commit 6f43e6b into main Jul 16, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/make-sa-exit-code branch July 16, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant