GitHub Action for ShellCheck . Supports Linux and macOS on x86_64 and ARM64.
on :
push :
branches :
- main
pull_request :
permissions :
contents : read
jobs :
shellcheck :
name : ShellCheck
runs-on : ubuntu-latest
steps :
- uses : actions/checkout@v6
- uses : Shardbyte/shard-shellcheck@v1.0.0
Input
Default
Description
version
stable
ShellCheck version to download. Any tag from the ShellCheck releases .
severity
(all)
Minimum severity to fail on: error, warning, info, style
format
gcc
Output format: checkstyle, diff, gcc, json, json1, quiet, tty
scandir
.
Directory to search for shell scripts
check_together
(off)
Run ShellCheck on all found files in a single invocation
ignore_paths
(none)
Space-separated paths to exclude
ignore_names
(none)
Space-separated filenames to exclude
additional_files
(none)
Space-separated extra filenames to include (e.g. run finish)
Output
Description
files
Newline-separated list of shell scripts found and checked
options
The ShellCheck options used
Pass ShellCheck flags via environment variable
- uses : Shardbyte/shard-shellcheck@v1.0.0
env :
SHELLCHECK_OPTS : -e SC2059 -e SC2034 -e SC1090
Fail only on errors (ignore warnings and style)
- uses : Shardbyte/shard-shellcheck@v1.0.0
with :
severity : error
Ignore specific paths and filenames
- uses : Shardbyte/shard-shellcheck@v1.0.0
with :
ignore_paths : >-
vendor
third_party
ignore_names : legacy.sh
Scan a specific directory only
- uses : Shardbyte/shard-shellcheck@v1.0.0
with :
scandir : ./scripts
Check all files in a single invocation (resolves SC1090/SC1091 source errors)
- uses : Shardbyte/shard-shellcheck@v1.0.0
with :
check_together : ' yes'
Scan for additional non-standard filenames
- uses : Shardbyte/shard-shellcheck@v1.0.0
with :
additional_files : ' run finish'
Pin a specific ShellCheck version
- uses : Shardbyte/shard-shellcheck@v1.0.0
with :
version : v0.10.0
Use tty output format for richer log output
- uses : Shardbyte/shard-shellcheck@v1.0.0
with :
format : tty
OS
x86_64
ARM64
Linux
✅
✅
macOS
✅
✅