ShellCheck - A shell script static analysis tool
https://github.com/koalaman/shellcheck| Installer Source| Releases (json) (tab)
ShellCheck - A shell script static analysis tool
https://github.com/koalaman/shellcheck| Installer Source| Releases (json) (tab)
To update or switch versions, run webi shellcheck@stable
, or @vx.y.z
for a
specific version.
These are the files / directories that are created and/or modified with this install:
~/.config/envman/PATH.env
~/.local/opt/shellcheck/
~/.local/bin/shellcheck
shellcheck catches rookie mistakes (and old-habits-die-hard mistakes) in bash
Also recommended by Google's Shell Style Guide
shellcheck ./script.sh
shellcheck
is
supported by vim-ale
out-of-the-box™.
Just install vim-ale
and shellcheck
and
you're good to go.
See Visual Studio Marketplace: ShellCheck.
Simply include shellcheck in the process.
check-scripts:
# Fail if any of these files have warnings
shellcheck myscripts/*.sh
You can ignore an error by putting a comment with the SCXXXX
error code above
it:
# shellcheck disable=<code>
# shellcheck disable=SC1004
NOT_AN_ERROR='Look, a literal \
inside of a string!'
Complete list of SCXXXX
error codes:
https://gist.github.com/nicerobot/53cee11ee0abbdc997661e65b348f375