mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated Directive (markdown)
@@ -10,12 +10,12 @@ Supported directives are `disable` to disable warnings:
|
||||
# shellcheck disable=code[,code...]
|
||||
statement_where_warning_should_be_disabled
|
||||
|
||||
`source` to tell ShellCheck where to find a sourced file:
|
||||
`source` to tell ShellCheck where to find a sourced file (since 0.4.0):
|
||||
|
||||
# shellcheck source=src/examples/config.sh
|
||||
. "$(locate_config)"
|
||||
|
||||
`shell`, as a top level directive, to specify the shell for a script (like the shebang, if you for any reason don't want to add one):
|
||||
`shell`, as a top level directive, to specify the shell for a script (similar to the shebang, if you for any reason don't want to add one) (since 0.4.4):
|
||||
|
||||
# shellcheck shell=sh
|
||||
echo foo &> bar
|
||||
|
Reference in New Issue
Block a user