Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "CI: shellcheck"

on:
push:
branches: [main]
paths:
- "**/*.sh"
- ".github/workflows/shellcheck.yml"
pull_request:
branches: [main]
paths:
- "**/*.sh"
Comment on lines +7 to +12
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

With paths: ["**/*.sh"] only, this workflow will not run when the workflow file itself is modified (or when adding/configuring ShellCheck via config files). Consider including .github/workflows/shellcheck.yml (and any ShellCheck config files you expect) in the paths list so changes to the workflow are validated in PRs.

Suggested change
- "**/*.sh"
pull_request:
branches: [main]
paths:
- "**/*.sh"
- "**/*.sh"
- ".github/workflows/shellcheck.yml"
pull_request:
branches: [main]
paths:
- "**/*.sh"
- ".github/workflows/shellcheck.yml"

Copilot uses AI. Check for mistakes.
- ".github/workflows/shellcheck.yml"

permissions:
contents: read

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run shellcheck on all shell scripts
run: find . -name '*.sh' -not -path './.git/*' -print0 | xargs -0 --no-run-if-empty shellcheck
6 changes: 5 additions & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Docs: https://lefthook.dev/configuration/
#
# Glob patterns determine whether a job runs (based on staged files).
# The run commands then check the entire module — not just staged files.
# Go checks run on the entire module; shellcheck runs on staged files only.

pre-commit:
parallel: true
Expand All @@ -20,6 +20,10 @@ pre-commit:
glob: "**/*.{go,mod,sum}"
run: go test ./...

- name: shellcheck
glob: "**/*.sh"
run: if command -v shellcheck >/dev/null 2>&1; then shellcheck {staged_files}; else echo "shellcheck not installed — skipping"; fi

commit-msg:
commands:
conventional-commit:
Expand Down
Loading