Always run shellcheck after editing any shell scripts.
shellcheck path/to/script.sh
Or validate all shell scripts in the project:
find . -name "*.sh" -exec shellcheck {} \;
Project-specific shellcheck rules are defined in .shellcheckrc. Default severity is error to catch all issues.
Consider adding a pre-commit hook for automatic validation:
# .pre-commit-config.yaml
repos:
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
hooks:
- id: shellcheck
args: [--severity=error]