Shellcheck resolves source directive relative to the working directory that it was executed, no relative to the file, e.g.
src/
- sourcing.sh
- source.sh
If you run shellcheck from project root it expects the sourcing.sh file to have
# shellcheck source=src/source.sh
BashSupport-Pro resolves the directive relative to the file it's in, so it expects:
# shellcheck source=../src/source.sh
So either the directive will fail for CLI shellcheck or for the plugin.
I think it's reasonable for the plugin to assume that shellcheck would be run from project root.
An additional setting to override this might be useful.
$ shellcheck --version
ShellCheck - shell script analysis tool
version: 0.9.0
license: GNU General Public License, version 3
website: https://www.shellcheck.net
Shellcheck resolves
sourcedirective relative to the working directory that it was executed, no relative to the file, e.g.If you run shellcheck from project root it expects the
sourcing.shfile to haveBashSupport-Pro resolves the directive relative to the file it's in, so it expects:
So either the directive will fail for CLI shellcheck or for the plugin.
I think it's reasonable for the plugin to assume that shellcheck would be run from project root.
An additional setting to override this might be useful.