

# Fail if any of these files have warnings It makes canonical use of exit codes, so you can just add a shellcheck command as part of the process.įor example, in a Makefile: check-scripts: While ShellCheck is mostly intended for interactive use, it can easily be added to builds or test suites. Most other editors, through GCC error compatibility. Vim, through ALE, Neomake, or Syntastic:.You can see ShellCheck suggestions directly in a variety of editors. Run shellcheck yourscript in your terminal for instant output, as seen above. is always synchronized to the latest git commit, and is the easiest way to give ShellCheck a go. Paste a shell script on for instant feedback. There are a number of ways to use ShellCheck! On the web See the gallery of bad code for examples of what ShellCheck can help you identify! Table of Contents To point out subtle caveats, corner cases and pitfalls that may cause anĪdvanced user's otherwise working script to fail under future circumstances. To point out and clarify typical intermediate level semantic problems thatĬause a shell to behave strangely and counter-intuitively. To point out and clarify typical beginner's syntax issues that cause a shell ShellCheck is a GPLv3 tool that gives warnings and suggestions for bash/sh shell scripts: ShellCheck - A shell script static analysis tool
