
ShellCheck – shell script analysis tool
ShellCheck is an open source static analysis tool that automatically finds bugs in your shell scripts.
ShellCheck – Shell script analyzer
ShellCheck is a free, online and offline tool that detects problems and suggests improvements to shell scripts.
ShellCheck
SC1126 – Place shellcheck directives before commands, not after. SC1127 – Was this intended as a comment? Use `#` in sh. SC1128 – The shebang must be on the first line. Delete blanks …
SC1090 – ShellCheck Wiki
ShellCheck is not able to include sourced files from paths that are determined at runtime. The file will not be read, potentially resulting in warnings about unassigned variables and similar.
Double quote to prevent globbing and word splitting. - ShellCheck
SC2086 – ShellCheck Wiki Double quote to prevent globbing and word splitting. Problematic code: echo $1 for i in $*; do :; done # this one and the next one also apply to expanding …
ShellCheck: SC2034 – foo appears unused. Verify it or export it.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.
ShellCheck: SC2148 – Tips depend on target shell and yours is …
Rationale: Different shells support different features. To give effective advice, ShellCheck needs to know which shell your script is going to run on. You will get a different numbers of warnings …
ShellCheck: SC2206 – Quote to prevent word splitting/globbing, or …
Exceptions: If you have already taken care (through setting IFS and set -f) to have word splitting work the way you intend, you can ignore this warning. ShellCheck is a static analysis tool for …
ShellCheck: SC2154 – var is referenced but not assigned.
ShellCheck has noticed that you reference a variable that is not assigned. Double check that the variable is indeed assigned, and that the name is not misspelled.
ShellCheck: SC2155 – Declare and assign separately to avoid …
Note that ShellCheck does not warn about masking of local read-only variables, such as local -r foo=$(cmd), even though this also masks the return value. This is because the alternative …