All apps/ShellCheck

ShellCheck

shellcheck

ShellCheck is a static analysis and linting tool for sh/bash scripts.

Runs as shellcheck|macOS, Linux, Windows|www.shellcheck.net

Command form

ai-draft · 3 tasks · 10 fields

Lint one or more shell scripts with ShellCheck. Color, wiki-link count, source paths and rc-file overrides are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui shellcheck
Check shell scriptsExample values, fixed in this page — nothing here reaches a terminal
Basic
Script files*
file
Shell dialect
5 choicesenum
Minimum severity
4 choicesenum
Exclude codes
string
TasksEach one presets the form for one job
Lint scripts
filesshellseverityexclude
Lint following sourced files
filesshellexternal_sourcescheck_sourced
Machine-readable output
filesformatshellseverity
ParametersOnly these flags are editable in the form
Script files
Use - to read the script from standard input.
path · positional 0 · repeatable
Shell dialect
Override the dialect instead of using the shebang.
enum
--shell-sshbashdashkshbusybox
Minimum severity
enum
--severity-Serrorwarninginfostyle
Output format
enum
--format-fttygcccheckstylediffjsonjson1quiet
Exclude codes
Comma-separated warning codes, for example SC2086,SC2164.
string
--exclude-e
Only these codes
Comma-separated warning codes to consider.
string
--include-i
Optional checks
Comma-separated optional checks, or all. See --list-optional.
string
--enable-oall
Follow external sources
Allow source statements to files outside the checked files.
boolean
--external-sources-x
Include sourced warnings
boolean
--check-sourced-a
Ignore .shellcheckrc
boolean
--norc
SourcesEvery flag above is checked against these
help
Usage: shellcheck [OPTIONS...] FILES... -a --check-sourced Include warnings from sourced files -i CODE1,CODE2.. --include=CODE1,CODE2.. Consider only given types of warnings -e CODE1,CODE2.. --exclude=CODE1,CODE2.. Exclude types of warnings --list-optional List checks disabled by…
helpshellcheck --help (0.11)

Before it fills your prompt, Otty checks the installed shellcheck against its version. A form that does not match your version is not offered.