Skip to content

ci(hooks): add shellcheck step to pre-push#36

Merged
brettdavies merged 1 commit into
devfrom
feat/pre-push-shellcheck
May 27, 2026
Merged

ci(hooks): add shellcheck step to pre-push#36
brettdavies merged 1 commit into
devfrom
feat/pre-push-shellcheck

Conversation

@brettdavies

@brettdavies brettdavies commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a shellcheck --severity=warning step to the pre-push hook between the pack-README drift check and the prose-check stage. Lints every tracked *.sh plus everything under scripts/hooks/ at warning severity, which catches real bugs (unused vars, quoting issues, missing exits) while ignoring info/style noise. Skips with a one-line note when shellcheck isn't on PATH. Zero findings on the current tree, including the hook script itself.

Mirrors the pattern landed in agentnative-cli commit a014240. The doc-comment block in the new shell-linting section was worded so lines starting with # shellcheck (which would otherwise be parsed as SC1072/SC1073 directives) are avoided.

The rebase onto dev (after retargeting this PR from maindev) carried three small consistency edits in the same file so the resulting diff stays self-contained:

  • Renumbered the header pipeline list: shellcheck takes step 8; prose-check is now step 9.
  • Updated the "branch deletions" comment from "stages 7 and 8 redirect their child stdin to /dev/null" to "stages 7 and 9," since the new step 8 (shellcheck) doesn't redirect stdin.
  • Preferred dev's prose-check description ("plus LanguageTool when reachable") over the older base's wording ("plus LanguageTool over Tailscale when reachable").

Changelog

Linked check review

No check changes needed. This PR touches scripts/hooks/pre-push only. No principle frontmatter, no requirements[] changes, no tier moves.

Human reviewer

Reviewer: @brettdavies

AI disclosure

Hook edits, doc comments, SC1072/SC1073 collision avoidance, conflict resolution during the rebase onto dev, and this PR body were AI-drafted under direct supervision. Branch authoring, scope decision, slot placement between the pack-README drift and prose-check stages, and the base-branch retarget were Brett's calls.

@brettdavies brettdavies changed the base branch from main to dev May 27, 2026 05:08
Lints every tracked `*.sh` plus everything under `scripts/hooks/` at `--severity=warning`, mirroring the agentnative-cli hook pattern. Skips with a one-line note when shellcheck isn't installed. Slotted between the pack-readme drift check and the prose-check stage so script hygiene gates land alongside the other lint stages.

Zero existing findings on the current tree.

# Conflicts:
#	scripts/hooks/pre-push

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# interactive rebase in progress; onto 0627021
# Last command done (1 command done):
#    pick da5c847 # ci(hooks): add shellcheck step to pre-push
# No commands remaining.
# You are currently rebasing branch 'feat/pre-push-shellcheck' on '0627021'.
#
# Changes to be committed:
#	modified:   scripts/hooks/pre-push
#
@brettdavies brettdavies force-pushed the feat/pre-push-shellcheck branch from da5c847 to 4e9db5f Compare May 27, 2026 05:12
@brettdavies brettdavies merged commit 502985b into dev May 27, 2026
@brettdavies brettdavies deleted the feat/pre-push-shellcheck branch May 27, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant