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).
Usage:
bashcritic [-12345 | --brutal | --cruel | --harsh | --stern | --gentle]
[--posix | --bourne]
[--severity number | name]
[--list [format]]
[-verbose ]
{FILE | STDIN}
possible listing formats
- trac for the trac wiki
Install globally (root/superuser permissions needed)
In the src directory run:
perl Makefile.PL
make
make install
Install locally
In the src directory run:
perl Makefile.PL PREFIX=${HOME}
make
make install
In this case files will be installed in ${HOME}/bin, ${HOME}/lib and
${HOME}/man
What's New in This Release:
· Usage documentation was added.
· The perlcritic outputlevels were removed, so now there are error, cosmetic, and info only.
· The shell is detected from the shebang.
· New checks were added.
· version.pm was added to the distribution (since it is needed by Makefile.PL).
Product's homepage