ShellCheck is a GPLv3 tool that gives warnings and suggestions for bash/sh shell scripts:
https://github.com/koalaman/shellcheck