Action — shellcheck
Runs ShellCheck on all .sh files in the repository.
Usage
yaml
steps:
- uses: actions/checkout@v7
- uses: KevinDeBenedetti/github-workflows/.github/actions/shellcheck@main
with:
severity: warningInputs
| Input | Type | Default | Description |
|---|---|---|---|
severity | string | warning | Minimum severity level: error | warning | info | style |
exclude-paths | string | */test_helper/* | Glob passed to find -not -path to exclude from analysis |
default-shell | string | bash | Dialect for scripts with neither a supported shebang nor a # shellcheck shell= directive |
Notes
- Finds all
*.shfiles recursively under the current directory (excludingexclude-paths, and never descending into.git,node_modulesor.venv). - Each script is checked as the shell its shebang (or
# shellcheck shell=directive) declares, so#!/bin/shscripts get POSIX checks; only undeclared scripts, and scripts whose shebang names a shell ShellCheck does not support (zsh,fish…), fall back todefault-shell. - Reports issues in GCC format for clean integration with GitHub annotations.
- Installs a pinned ShellCheck release (x86_64 or aarch64) — nothing needs to be preinstalled on the runner.