If, like me, you find yourself trying to use shellcheck to lint .zsh
files with #!/bin/zsh
but it keeps telling you:
shellcheck: error error
What I was able to do is pass the --shell=bash
argument to shellcheck
and then it would lint my files.
In my case this was configured in my SublimeLinter config, like so:
{ "linters": { "shellcheck": { "args": [ "--shell=bash" ] }, } }
…just in case you are using Sublime Text!