Review https://www.shellcheck.net/ and see if it is a useful tool for checking bash, zsh and other scripts.