diff --git a/Directive.md b/Directive.md new file mode 100644 index 0000000..0160f4a --- /dev/null +++ b/Directive.md @@ -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. \ No newline at end of file