Updated Directive (markdown)

koalaman
2015-08-19 18:58:57 -07:00
parent a1d88a4801
commit b7d3947a27

@@ -5,10 +5,16 @@ Shellcheck directives allows selectively silencing warnings, and takes the form
printf "\x$1" printf "\x$1"
} }
The only supported directive is `disable`: Supported directives are `disable` to disable warnings:
# shellcheck disable=code[,code...] # shellcheck disable=code[,code...]
statement_where_warning_should_be_disabled
Directives are scoped to the structure that follows it. For example, before a function it silences all warnings in the function. Before a case statement, it silences all warnings in all branches of the case statement. and `source` to tell ShellCheck where to find a sourced file:
# shellcheck source=src/examples/config.sh
. "$(locate_config)"
Directives are scoped to the structure that follows it. For example, before a function it silences all warnings (or overrides all `source` statements) in the function Before a case statement, it silences all warnings in all branches of the case statement.
Silencing parser errors is purely cosmetic, and will not make ShellCheck continue. Silencing parser errors is purely cosmetic, and will not make ShellCheck continue.