OS Manuals

/usr/bin/shellcheck

A shell script static analysis tool

From shellcheck 0.11.0-r7 (enterprise-packages), captured 2026-11-08 by running shellcheck --help (exit 0). permalink

Usage: shellcheck [OPTIONS...] FILES...
  -a                  --check-sourced            Include warnings from sourced files
  -C[WHEN]            --color[=WHEN]             Use color (auto, always, never)
  -i CODE1,CODE2..    --include=CODE1,CODE2..    Consider only given types of warnings
  -e CODE1,CODE2..    --exclude=CODE1,CODE2..    Exclude types of warnings
                      --extended-analysis=bool   Perform dataflow analysis (default true)
  -f FORMAT           --format=FORMAT            Output format (checkstyle, diff, gcc, json, json1, quiet, tty)
                      --list-optional            List checks disabled by default
                      --norc                     Don't look for .shellcheckrc files
                      --rcfile=RCFILE            Prefer the specified configuration file over searching for one
  -o check1,check2..  --enable=check1,check2..   List of optional checks to enable (or 'all')
  -P SOURCEPATHS      --source-path=SOURCEPATHS  Specify path when looking for sourced files ("SCRIPTDIR" for script's dir)
  -s SHELLNAME        --shell=SHELLNAME          Specify dialect (sh, bash, dash, ksh, busybox)
  -S SEVERITY         --severity=SEVERITY        Minimum severity of errors to consider (error, warning, info, style)
  -V                  --version                  Print version information
  -W NUM              --wiki-link-count=NUM      The number of wiki links to show, when applicable
  -x                  --external-sources         Allow 'source' outside of FILES
                      --help                     Show this usage summary and exit
Options (19)
OptionDescriptionSource
-a, --check-sourced--check-sourced Include warnings from sourced fileshelp + man
-C WHEN--color[=WHEN] Use color (auto, always, never)help
-i CODE1--include=CODE1,CODE2..help
-e CODE1--exclude=CODE1,CODE2..help
-f, --format FORMATSpecify the output format of shellcheck, which prints its results in the standard output.help + man
-o check1--enable=check1,check2..help
-P SOURCEPATHS--source-path=SOURCEPATHS Specify path when looking for sourced files ("SCRIPTDIR" for script's dir)help
-s SHELLNAME--shell=SHELLNAME Specify dialect (sh, bash, dash, ksh, busybox)help
-S SEVERITY--severity=SEVERITY Minimum severity of errors to consider (error, warning, info, style)help
-V, --version--version Print version informationhelp + man
-W, --wiki-link-count NUMFor TTY output, show NUM wiki links to more information about mentioned warnings.help + man
-x, --external-sourcesFollow source statements even when the file is not specified as input.help + man
--extended-analysis true/falseEnable/disable Dataflow Analysis to identify more issues (default true). (in the manual page but not in --help)man
--list-optionalOutput a list of known optional checks. (in the manual page but not in --help)man
--norcDon't try to look for .shellcheckrc configuration files. (in the manual page but not in --help)man
--rcfile RCFILEPrefer the specified configuration file over searching for one in the default locations. (in the manual page but not in --help)man
--source-path SOURCEPATHSpecify paths to search for sourced files, separated by : on Unix and ; (in the manual page but not in --help)man
--shell shellSpecify Bourne shell dialect. (in the manual page but not in --help)man
--severity severitySpecify minimum severity of errors to consider. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.