Matteo Corti edited this page Oct 16, 2015 · 1 revision


bashcritic is a tool to check shell scripts for common pitfalls

bashcritic is in alpha stage: I would appreciate comments as well as suggestions on what could be checked (in addition to the implemented tests)

Mail any critique, comment or suggestion to matteo@corti.lior post them in the ticket section


  • 2008-01-31: version 0.3.3 (alpha): corrected a syntax error in a check rule (#39)
  • 2008-01-30: version 0.3.2 (alpha): some new rules, less error levels and automatic shell detection. See the [source:trunk/Changes@50 change log] for more details.
  • 2007-10-20: version 0.3.0 (alpha): some new rules (#11, #15, #18 and #22), does not process comments and strings (#3) and some minor fixes (#32). See the [source:trunk/Changes@41 change log] for more details.
  • 2007-10-18: version 0.2.1 (alpha): bug fix release (r27 fixes a program crash due to an error in a rule definition)
  • 2007-10-17: version 0.2.0 (alpha): several improvements and corrections (mainly from


      bashcritic [-012 | --info | --cosmetic | --error]
                 [--posix | --bourne]
                 [--severity number]
                 [--ignore_shebang ]
                 [--list [format]]
                 [-verbose ]
                 {FILE | STDIN}


        --error,-e,-0        report only errors
        --cosmetic,-c,-1     report errors and cosmetic problems
        --info,-i,2          report error, cosmetic problems and minor issues

        --posix              script should be POSIX compliant
        --bourne             script should be Bourne shell compatible

        --list [format]      lists implemented tests (formats: trac)

        --ignore-shebang     ignores the script shebang
        --[no-]color         colorize output

        --help,-h,-?         prints this help message
        --verbose,-v         increase verbosity
        --version,-V         prints program version and exits


Short list of documents and resources that has to be checked for rules

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.