Shell Check

Run shellcheck to lint shell scripts for common issues and best practices

controlplaneio-fluxcd 5d249cc 735 B Updated

File contents

Shell Check

Use shellcheck to analyze shell scripts for syntax errors, semantic problems, and style issues.

Usage

To check a single script:

shellcheck script.sh

To check all shell scripts in the current directory:

shellcheck *.sh

To check scripts recursively:

find . -name '*.sh' -exec shellcheck {} +

Common Options

  • -e CODE — exclude a specific warning (e.g. shellcheck -e SC2086 script.sh)
  • -s SHELL — specify the shell dialect (bash, sh, dash, ksh)
  • -f FORMAT — output format (tty, json, gcc, diff)

controlplaneio-fluxcd/flux-operator/tree/main/config/testdata/skills/shell-check commit 5d249cc2a6

Frequently asked questions

npx skillmds@latest add controlplaneio-fluxcd/shell-check