shellcheck v0.7.1 release: static analysis tool for shell scripts
ShellCheck – A shell script static analysis tool
The goals of ShellCheck are
- To point out and clarify typical beginner’s syntax issues that cause a shell to give cryptic error messages.
- To point out and clarify typical intermediate level semantic problems that cause a shell to behave strangely and counter-intuitively.
- To point out subtle caveats, corner cases, and pitfalls that may cause an advanced user’s otherwise working script to fail under future circumstances.
This release is dedicated to the board game Pandemic, for teaching us relevant survival skills like how to stay inside and play board games.
On Debian based distros:
apt-get install shellcheck
On Arch Linux based distros:
pacman -S shellcheck
On the web
Paste a shell script on https://www.shellcheck.net for instant feedback.
From your terminal
Run shellcheck yourscript in your terminal for instant output, as seen above.
In your editor
You can see ShellCheck suggestions directly in a variety of editors.
- Emacs, through Flycheck:
- Sublime, through SublimeLinter.
- Atom, through Linter.
- VSCode, through vscode-shellcheck.
- Most other editors, through GCC error compatibility.
In your build or test suites
While ShellCheck is mostly intended for interactive use, it can easily be added to builds or test suites.
It makes canonical use of exit codes and can output simple JSON, CheckStyle compatible XML, GCC compatible warnings as well as human-readable text (with or without ANSI colors).
Copyright 2012-2018, Vidar ‘koala_man’ Holen and contributors.