ShellCheck, a static analysis tool for shell scripts
Go to file
Vidar Holen b087b7efb1 Some hlint fixes.
Ironically, this is the first time the linter has been linted.
2014-02-16 12:57:34 -08:00
ShellCheck Some hlint fixes. 2014-02-16 12:57:34 -08:00
test Added ulimit to test script because lol debugging 2012-11-19 23:24:24 -08:00
.gitignore Added a shellcheck(1) man page 2013-12-16 00:04:31 +01:00
LICENSE Added readme and licenses 2012-11-16 19:43:05 -08:00
Makefile Tweaked man page format 2013-12-15 19:40:05 -08:00
README README: Updated URL, reformatted long lines 2014-02-08 09:58:11 -08:00
Setup.hs Cleaned up cabal file to make 'cabal check' pass. 2014-01-19 13:03:05 -08:00
ShellCheck.cabal Stable version 0.3.1 2014-02-03 20:22:30 -08:00
shellcheck.1.md Added -s to the man page 2014-02-02 21:56:04 -08:00
shellcheck.hs Some hlint fixes. 2014-02-16 12:57:34 -08:00

README

ShellCheck - A shell script static analysis tool
http://www.shellcheck.net

Copyright 2012-2014, Vidar 'koala_man' Holen
Licensed under the GNU Affero General Public License, v3

The goals of ShellCheck are:

  - To point out and clarify typical beginner's syntax issues,
    that causes a shell to give cryptic error messages.

  - To point out and clarify typical intermediate level semantic problems,
    that causes 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.

ShellCheck is written in Haskell, and requires GHC, Parsec3, JSON and
Text.Regex. To run the unit tests, it also requires QuickCheck2.

On Fedora, these can be installed with:
  yum install cabal-install ghc ghc-parsec-devel ghc-QuickCheck-devel \
      ghc-json-devel ghc-regex-compat-devel

On Ubuntu and similar, use:
  apt-get install ghc libghc-parsec3-dev libghc-json-dev \
      libghc-regex-compat-dev libghc-quickcheck2-dev cabal-install

For older releases, you may have to use:
  apt-get install ghc6 libghc6-parsec3-dev libghc6-quickcheck2-dev \
      libghc6-json-dev libghc-regex-compat-dev cabal-install

On Mac OS X with homebrew (http://brew.sh/), use:
  brew install cabal-install

On Mac OS X with MacPorts (http://www.macports.org/), use:
  port install hs-cabal-install

Executables can be built with cabal. Tests currently still rely on a Makefile.

Install:
  $ cabal install
  ...
  $ which shellcheck
  ~/.cabal/bin/shellcheck

Happy ShellChecking!