Skip to content

feat: add shellcheck gate for actions/setup/sh - #49761

Merged
pelikhan merged 4 commits into
mainfrom
copilot/add-shellcheck-linting
Aug 2, 2026
Merged

feat: add shellcheck gate for actions/setup/sh#49761
pelikhan merged 4 commits into
mainfrom
copilot/add-shellcheck-linting

Conversation

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Adds shellcheck at --severity=error on actions/setup/sh/*.sh as a linting gate wired into the existing lint target, which propagates automatically to both agent-report-progress-no-test and agent-report-progress.

Changes

  • New shellcheck-setup-sh target — runs shellcheck --severity=error actions/setup/sh/*.sh
  • lint target — adds shellcheck-setup-sh as a dependency alongside lint-action-sh

--severity=error is the baseline (all scripts currently pass); style-level warnings are not enforced to avoid blocking on pre-existing noise.


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 15.5 AIC · ⌖ 5.53 AIC · ⊞ 8.3K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title feat: add shellcheck linting gate for actions/setup/sh feat: add shellcheck gate for actions/setup/sh Aug 2, 2026
Copilot AI requested a review from pelikhan August 2, 2026 10:52
@pelikhan
pelikhan marked this pull request as ready for review August 2, 2026 11:11
Copilot AI review requested due to automatic review settings August 2, 2026 11:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds error-level ShellCheck validation for setup shell scripts.

Changes:

  • Adds shellcheck-setup-sh.
  • Integrates it into lint.
Show a summary per file
File Description
Makefile Defines and wires in the ShellCheck lint gate.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread Makefile Outdated
.PHONY: shellcheck-setup-sh
shellcheck-setup-sh:
@echo "Running shellcheck on actions/setup/sh..."
@shellcheck --severity=error actions/setup/sh/*.sh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in dba99b9/home/runner/work/gh-aw/gh-aw/Makefile now installs pinned ShellCheck v0.11.0 via make install-shellcheck, deps-dev includes that installer, and make shellcheck-setup-sh uses the managed binary path instead of assuming a host-provided shellcheck.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. Test Quality Sentinel skipped.

@pelikhan

pelikhan commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@copilot add a ci job that runs the shellcheck linting

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: feat: add shellcheck gate for actions/setup/sh

The change is minimal and well-scoped — one new shellcheck-setup-sh Make target wired into lint. The logic is correct.

An existing comment already flags the blocking issue: shellcheck is invoked by lint but is not installed by deps-dev or any documented setup step, so CI and new contributors will hit a missing-binary failure on first run.

No other blocking issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 27.1 AIC · ⌖ 7.49 AIC · ⊞ 5.4K

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: Approve with a note

Small, low-risk addition (8 lines) wiring shellcheck --severity=error into the lint target for actions/setup/sh/*.sh.

Notes
  • The dependency gap (shellcheck not installed by deps-dev/tools, only implicitly available because GitHub-hosted ubuntu-latest runners ship it preinstalled) is already flagged in an existing review comment on this PR — not duplicating it here.
  • No other correctness, security, or maintainability issues found in this diff; the change is scoped correctly and the .PHONY target and error message are consistent with neighboring targets.

🔎 Code quality review by PR Code Quality Reviewer · auto · 14.8 AIC · ⌖ 4.52 AIC · ⊞ 7.8K
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design — requesting changes on three issues before merging.

📋 Key Themes & Highlights

Issues to address

  1. Missing binary guard (line 1026) — shellcheck is not installed by deps-dev; any developer or CI runner without it gets an unhelpful command not found failure. Add a pre-flight guard matching the golint pattern, or install shellcheck in deps-dev.

  2. Shallow glob (line 1026) — actions/setup/sh/*.sh skips sub-directories and errors when no files match. Replace with find actions/setup/sh -name '*.sh' -print0 | xargs -0 shellcheck --severity=error.

  3. Missing help entry — The new shellcheck-setup-sh target is undocumented in the help block; every other lint target has an entry.

Positive Highlights

  • ✅ Clean, minimal change that wires directly into the existing lint pipeline
  • ✅ Correct use of --severity=error to avoid blocking on pre-existing style noise
  • ✅ Good .PHONY declaration

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 44.6 AIC · ⌖ 8.47 AIC · ⊞ 7.1K
Comment /matt to run again

Comments that could not be inline-anchored

Makefile:1026

[/codebase-design] The shellcheck binary is not installed by deps-dev, so make lint will fail with command not found on machines that lack it.

<details>
<summary>💡 Suggested fix</summary>

Add a pre-flight guard (mirroring the golint pattern at lines 756–762):

shellcheck-setup-sh:
	`@if` ! command -v shellcheck &gt;/dev/null 2&gt;&amp;1; then \n		echo &quot;shellcheck is not installed. Run: brew install shellcheck / apt-get install shellcheck&quot;; \n		exit 1; \n	fi
	`@shellcheck` --s…

</details>

<details><summary>Makefile:1031</summary>

**[/codebase-design]** The glob `actions/setup/sh/*.sh` only covers the top-level directory. If scripts are nested (e.g. sub-directories), they are silently skipped. Also, if no `.sh` files exist at that path the shell expansion fails with `No such file or directory`.

&lt;details&gt;
&lt;summary&gt;💡 Suggested fix&lt;/summary&gt;

Use `find` for recursive coverage and handle the empty-match case:

```makefile
`@find` actions/setup/sh -name &#39;*.sh&#39; -print0 | xargs -0 shellcheck --severity=error

`find ... | …

Makefile:1310

[/codebase-design] The help target at this line is missing an entry for the new shellcheck-setup-sh target. All other added targets in this Makefile are documented in the help block.

<details>
<summary>💡 Suggested fix</summary>

Add after line 1310:

`@echo` &quot;  shellcheck-setup-sh - Run shellcheck on actions/setup/sh scripts at error severity&quot;

</details>

@copilot please address this.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot add a ci job that runs the shellcheck linting

Addressed in f554054 — added a dedicated CI job in .github/workflows/ci.yml that installs ShellCheck and runs make shellcheck-setup-sh.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please address the open review feedback on this PR, then run the pr-finisher skill.

Open review thread(s):

Also refresh the branch as needed and re-run formatting/checks before pushing.

Generated by PR Sous Chef · run:

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 15.5 AIC · ⌖ 5.53 AIC · ⊞ 8.3K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Please address the open review feedback on this PR, then run the pr-finisher skill.

Open review thread(s):...

Addressed in dba99b9 — I applied the open ShellCheck review feedback, refreshed the branch state by fetching origin/main for the impacted-test base ref, and re-ran the local checks before pushing.

Copilot AI requested a review from gh-aw-bot August 2, 2026 12:09
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

PR Triage

  • Category:
  • Risk:
  • Priority: (score: 30/100)
    • Impact: 18/50, Urgency: 10/30, Quality: 2/20
  • Recommended action:

Automated triage — see full report issue for details.

Structured data:

{
  "action": "defer",
  "category": "feature",
  "pr_number": 49761,
  "risk": "low"
}

Generated by 🔧 PR Triage Agent · auto · 73.4 AIC · ⌖ 3.47 AIC · ⊞ 8K ·

@pelikhan
pelikhan merged commit c4f4ed7 into main Aug 2, 2026
34 checks passed
@pelikhan
pelikhan deleted the copilot/add-shellcheck-linting branch August 2, 2026 12:55
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants