by lvillani · 8y ago · 0 comments
It catches so many errors that I think it's a must have in every programmer's toolbox. It even catches bash-isms when you are targeting POSIX sh. It saved me many many hours of grief trying to debug shell scripts I wrote and changed the way I write them for the better.
The documentation is especially great, for ever problem it detects you get an unique reference which you can lookup on the wiki eg: https://github.com/koalaman/shellcheck/wiki/SC2086 It then not only describes the problem but also shows different ways of solving it with some great examples and reasoning. I think I learned more Bash from Shellcheck than anywhere else.
I'm hard pressed to think of a modern unix that doesn't include bash by default. Solaris maybe?
Portability is only desirable, if you need portability - otherwise it frequently adds complexity for little return benefit.