← Software

ShellCheck

A static analysis tool for shell scripts.

ShellCheck reads a sh or bash script and reports common mistakes: missing quotes, broken arithmetic, unintended word splitting, incorrect parameter expansion, and many subtler pitfalls. Each check has a stable code (SC2086, SC2068, etc.) and a wiki page explaining the issue with examples and fixes.

Vidar Holen started ShellCheck in 2012 in Haskell. The web front-end at shellcheck.net lets users paste a script into a browser and get the same diagnostics — a useful entry point that has helped popularise the tool. Most editors and CI systems integrate ShellCheck either natively or through a plugin.

ShellCheck has become the standard linter for shell scripts. The combination of detailed wiki explanations and a clear, actionable diagnostic format has shifted the conversation around shell-scripting style: many of the patterns that "everybody knew" were correct in the 2000s now have a ShellCheck warning explaining why they break in edge cases.

License: GPL-3.0-or-later

Category: Developer tools

Website: https://www.shellcheck.net/

Install

Debian/Ubuntu: sudo apt install shellcheck
Fedora/RHEL:   sudo dnf install ShellCheck
Arch:          sudo pacman -S shellcheck
macOS:         brew install shellcheck

Authors

  • Vidar Holen (creator)
Previousscrot Nextshfmt

This site is currently in Beta. Contact: Chris Paton

Textbook of AI · Textbook of Usability · Textbook of Digital Health

Auckland Maths and Science Tutoring