6 ms·
Excellent, bash the good parts. More than 15 minutes though. Googling bashlint, shlint turns up some discussion (bash -n, ksh -n, zsh -n, some github projects)
by hyp0 12y ago
Excellent, bash the good parts. More than 15 minutes though.
Googling bashlint, shlint turns up some discussion (bash -n, ksh -n, zsh -n, some github projects), but I doubt they cover this article's specifics - though most (all?) of it could be automatically checked. I think some could be automatically added (e.g. set -o nounset) - perhaps a bash-subset (or coffeescript-style language) possible...
- notfoss 12y agoI have had good results with Syntastic for Vim. Running :SyntasticInfo lists 'sh' as the linting program for bash scripts.
- curiousbiped 12y agoTry out shellcheck - there's an online checker at http://www.shellcheck.net/ http://www.shellcheck.net/, and if you like it, the source for it is on github at https://github.com/koalaman/shellcheck https://github.com/koalaman/shellcheck.