Created Directive (markdown)

koalaman
2014-02-08 11:16:24 -08:00
parent 9893360415
commit 2dbcd672aa

14
Directive.md Normal file

@@ -0,0 +1,14 @@
Shellcheck directives allows selectively silencing warnings, and takes the form of comments in files:
hexToAscii() {
# shellcheck disable=SC2059
printf "\x$1"
}
The only supported directive is `disable`:
# shellcheck disable=code[,code...]
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.
Silencing parser errors is purely cosmetic, and will not make ShellCheck continue.