Repository navigation
fix(check-affected): leave the guardrails git-hook copies to the excluded lint - #9464
kyle-sexton wants to merge 2 commits into
Conversation
…uded lint The pre-push check-affected job shellchecks every changed .sh file, so a commit that installs or refreshes the plugin-owned .githooks/guardrails/ copies cannot be pushed, though the workflow's shellcheck step excludes them. The job runs the merge-base copy of this script, so the fix must land first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…em in CI too Review follow-up: the skip arm covers .sh and .bash only, matching what the workflow excludes; the workflow's ShellCheck step gets the matching exclude so the comment holds on main; the stay-quiet case asserts the routing message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed I found no security issues in this pull request. The change excludes
critical-findings: 0 |
|
claude-review reviewed Code review of #9464 at 4a2d77c: no findings. I read the full diff (3 files) and the PR context, and checked the changed code against the surrounding script and workflow. I ran no tests or commands. The PR's
Two notes for the author. Neither is a finding.
|
|
Superseded by #9504: guardrails git hooks reach repositories through a lefthook remotes entry, so per-repo shared copies are no longer used. |
No related issue: unblocks pushes of the guardrails shared git-hook rollout (#9462), whose plugin-owned copies the local pre-push check and CI's ShellCheck step both lint.
Summary
The guardrails plugin's shared install writes plugin-owned copies of its git-hook scripts under
.githooks/guardrails/. They fail this repository's ShellCheck rules (theirsourcepaths assume the plugin layout), so a branch that installs or refreshes them cannot be pushed without skipping thecheck-affectedjob, and CI's ShellCheck step fails on them. This PR excludes those copies from both, and only from ShellCheck.Fix
scripts/check-affected.sh:.githooks/guardrails/*.shand*.bashgo to no lint list. Exec-bit, typos and shell-portability still see them. The job runs the merge-base copy of this script, so this must land on main before chore(git-hooks): install the guardrails git hooks as shared lefthook jobs #9462 can push without a skip..github/workflows/pr-require-checks.yml: theLint shell scriptsstep getsexclude: .githooks/guardrails/. This disables CI ShellCheck for that one directory. The action takes that input (ci-workflows.github/actions/shellcheck/action.yml: "Path substrings to skip, space-separated"). The originals are still ShellChecked: the 65.sh/.bashfiles underplugins/guardrails/are not excluded. Nothing yet checks that a copy still matches its original; that gap is item 10 of guardrails: shared install-git-hooks copies fail consumer CI (mode 100644, linted vendored scripts) #9426.Verification
scripts/check-affected.test.sh: a.githooks/guardrails/copy.shwith a ShellCheck finding passes--uncommittedand is reportedSKIP shellcheck (no changed shell). It fails on main's script (FAIL shellcheck ... .githooks/guardrails/copy.sh) and passes with the fix.bash scripts/check-affected.test.sh:PASS=48 FAIL=0.bash scripts/check-affected-gates.test.sh:PASS=7 FAIL=0.shellcheck --rcfile .shellcheckrc scripts/check-affected.shandactionlinton the workflow: clean.scripts/check-affected.sh --tests) on the head: pass.Related
🤖 Generated with Claude Code