SublimeLinter-shellcheck icon indicating copy to clipboard operation
SublimeLinter-shellcheck copied to clipboard

set shell for embedded script

Open braver opened this issue 7 years ago • 2 comments

via https://github.com/SublimeLinter/SublimeLinter/issues/1446

Ok, so the primary thing that stops shellcheck from running on embedded code is that it can't determine what shell the script is for. So, the solution is to have a setting for shellcheck that sets the shell via an arg when the root scope isn't source.sh.

braver avatar Jun 07 '18 14:06 braver

As described here: https://github.com/koalaman/shellcheck/wiki/SC2148 this would be fixed by allowing sublimelinter-shellcheck to provide a default shell (using the -s command line option)?

nicodeceulaer avatar Jun 14 '18 06:06 nicodeceulaer

-s doesn't provide a "default" but sets the value it will use regardless of the shebang. So you use one or the other. If I understand this correctly, it will use a reasonable default by itself, so we could also suppress the warning.

braver avatar Jun 14 '18 11:06 braver