shellcheck
also: SC
ShellCheck is a static analysis tool that scans shell scripts for syntax errors, potential bugs, and style issues before execution.
ShellCheck reads Bash, sh, and other POSIX shell scripts and identifies problems that would cause failures or unexpected behavior. It catches common mistakes like unquoted variables, incorrect test syntax, and missing error handling.
The tool runs without executing the script, making it safe to check potentially dangerous code. It provides specific error codes and helpful warnings, such as SC2086 (unquoted variable expansion) or SC2181 (checking exit status incorrectly).
Example: Running shellcheck myscript.sh on a script with $var in quotes might warn that word splitting could occur. ShellCheck is widely integrated into CI/CD pipelines, text editors, and development workflows to improve script quality.