From 2dbcd672aab773c6e9d0cc87bf7b8de8a94e9d63 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 8 Feb 2014 11:16:24 -0800 Subject: [PATCH] Created Directive (markdown) --- Directive.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Directive.md 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