shellcheck

Static analysis and lint tool for bash and sh scripts

brewmacoslinux
Try with needOr install directly
Source

About

Static analysis and lint tool, for (ba)sh scripts

Commands

shellcheck

Examples

Check a single shell script for errors and warnings$ shellcheck script.sh
Check multiple scripts and show detailed output$ shellcheck *.sh
Check script from stdin and only show errors (not warnings)$ cat script.sh | shellcheck -S error -