-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Description
The repository includes several .sh
files, but there is no automated shell‑script linting. Adding ShellCheck to the workflow will catch common bugs (missed set -e
, unquoted variables, etc.) before they reach production.
Proposed change
-
Add a CI step (or Makefile target) that runs ShellCheck inside the official Docker image
# lint‑shell.sh docker run --rm -v "$(pwd)":/mnt koalaman/shellcheck:latest $(git ls-files '*.sh')
-
Include the script in the existing GitHub Actions workflow
- name: ShellCheck run: ./lint-shell.sh
If the project doesn’t use Actions yet, this can be a separate workflow or invoked locally via
make lint-shell
. -
Fail the build on ShellCheck warnings to keep the main branch clean.
Benefits
- Detects syntax errors and unsafe patterns early.
- Enforces consistent, POSIX‑compliant shell code across contributors.
Suggestion
- CI fails when any
.sh
file triggers a ShellCheck warning. - Documentation updated with
make lint-shell
(or equivalent) instructions.
I noticed some of my code submitted had shellcheck issues so I thought I'd add this as a suggestion. Happy to open a PR if the maintainers agree!
Metadata
Metadata
Assignees
Labels
No labels