Shellcheck Support
ShellCheck, version 0.7.1, is bundled with BashSupport Pro.
Error Highlighting
BashSupport integrates ShellCheck’s warnings and error messages into the editor.
ShellCheck Directives
ShellCheck supports # shellcheck
comments to control how it works.
Tooltips
BashSupport Pro displays tooltips on the SC–codes of directives so that you don’t have to learn or search for the codes.

shellcheck disable=
The ShellCheck disable
directive is automatically inserted by BashSupport Pro to suppress ShellCheck messages.
It works as usual:
- Press Alt → Enter to see quickfixes and intentions
- Select Suppress with ShellCheck comment in the context menu of the warning you’d like to suppress
Intentions for ShellCheck messages
Multiple disable= directives for the same line are separated by a comma (,
).
|
|
shellcheck source=
|
|
BashSupport Pro supports ShellCheck’s source
directive. This directive is useful for filenames, which are not static.
../other.sh
is a static value, but "$(dirname "${BASH_SOURCE[0]}")/other.sh"
is not.
ShellCheck and BashSupport Pro only understand static values.
If you use a dynamic value in script, then you can use the # shellcheck source=
directive to define the static location:
|
|
BashSupport Pro assumes that the source
path is relative to the current file.
By default, ShellCheck uses the directory where it’s executed as root for source
paths. Use the source-path directive or execute shellcheck -P ...
if this is a problem in your setup.
- Go to Declaration
- You can navigate to the source files by ctrl → click or by using the Navigate → Go to Declaration action.
- Rename
- The
source=
path is updated when you rename the referenced file. It’s also updated when you move the file, which contains thesource
directive.
Settings
BashSupport Pro bundles ShellCheck binaries for macOS, Linux and Windows.
If you want to use a locally installed version of ShellCheck, then you can set your own path at
Settings… →
Languages & Frameworks →
BashSupport Pro
. Please make sure, that it points to ShellCheck 0.7.1 or later.