I have some files with no shebang and some with. I would like to run the same shellcheck command across all of them, with the dialect set by the shebang in files with one, and to a default otherwise. Unfortunately shellcheck -s dash overrides the shebang in files that have one. I'd like a "soft" equivalent to -s that only applies of there's no shebang or #shellcheck shell= directive in the file.
My use case is testing a bunch of files with a script, without having to code my own shebang-presence checker.
For new checks and feature suggestions
I have some files with no shebang and some with. I would like to run the same shellcheck command across all of them, with the dialect set by the shebang in files with one, and to a default otherwise. Unfortunately
shellcheck -s dash
overrides the shebang in files that have one. I'd like a "soft" equivalent to-s
that only applies of there's no shebang or#shellcheck shell=
directive in the file.My use case is testing a bunch of files with a script, without having to code my own shebang-presence checker.