fix(shellcheck): resolve the lint config the way CI does - #353
Merged
twistedmelonman merged 2 commits intoSep 19, 2026
Merged
Conversation
added 2 commits
September 18, 2026 16:31
lint-shell.sh passed no --rcfile, so shellcheck used its ancestor search, which reaches $HOME. Measured over 60 shell files at -S info: repo rc and canonical base both 0 findings, ~/.shellcheckrc (enable=all) 87. Adds lint-shellcheck.sh to resolve repo-root .shellcheckrc else the canonical base, and vendors that base from github-workflows/standards. Unblocks the per-repo .shellcheckrc deletions in claude-config#534, which would otherwise drop every local run onto ~/.shellcheckrc. Advances twistedmelonman/claude-config#534
lint-shell.sh calls lint-shellcheck.sh, a sibling symlink install.sh creates. A machine that pulls the previous commit without re-running install.sh does not have it, and under set -e that exits 127 and blocks every commit touching a shell file. Degrade to shellcheck's own discovery and say why.
| No blocking issues. The PR resolves shellcheck config lookup to avoid picking up ~/.shellcheckrc (enable=all) that CI never sees, ships a canonical config, and handles fresh-machine degradation gracefully. VERDICT: PASS |
|
VERDICT: PASS |
|
Configuration resolution for shellcheck added to pre-commit hook with graceful degradation. Code handles all failure paths (missing resolver, empty config, missing canonical config) by falling back to shellcheck's default discovery and printing diagnostic messages. Array expansion ( VERDICT: PASS |
twistedmelonman
deleted the
claude/fix-shellcheck-config-gate-592c2a44
branch
September 19, 2026 00:08
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.
The pre-commit shell hook ran shellcheck with no
--rcfile, so shellcheck fellback to its ancestor search. That search reaches
$HOMEand picked up~/.shellcheckrc(enable=all), which CI never sees.Measured over dotfiles' 60 tracked shell files at
-S info:.shellcheckrc~/.shellcheckrc(enable=all)Adds
lint-shellcheck.sh, which resolves the repo-root.shellcheckrcif thereis one and the canonical base otherwise, and passes it explicitly. Vendors that
base byte-identical from
github-workflows/standards/shellcheckrc.enable=allstays in~/.shellcheckrcas the stricter interactive config. Itis deliberately not in the base: a base that forces per-repo exceptions is not a
base.
Full suite green: 335 assertions, 0 failures.
Advances twistedmelonman/claude-config#534 — this is what unblocks step 3, the
per-repo
.shellcheckrcdeletions, which would otherwise drop every local runonto those 87 findings.
https://claude.ai/code/session_011awg91UvzUos9YoXHJ2e8B