There's a good linter for BASH called ShellCheck, it can be installed on Debian based systmes with:
# apt-get install shellcheck
You can then invoke it simply from the command line to get feedback on your shell script. The messages are colour coded to indicate their severity: green, yellow and red:
shellcheck
It's easy getting on the fly linting of the BASH scripts you're working on by installing flycheck:
flycheck bash
M-xpackage-installflycheck
and enable it everwhere:
(setqglobal-flycheck-modet)
It will now pick up whatever linting tool you've installed for the
current mode, e.g. shellcheck. For a list of all languages and
linting tools it supports out of the box, have a look at
this list .