From b7d3947a27275153ea0e2be5308f2db141b3721d Mon Sep 17 00:00:00 2001 From: koalaman Date: Wed, 19 Aug 2015 18:58:57 -0700 Subject: [PATCH] Updated Directive (markdown) --- Directive.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Directive.md b/Directive.md index 0c91019..5e162c4 100644 --- a/Directive.md +++ b/Directive.md @@ -5,10 +5,16 @@ Shellcheck directives allows selectively silencing warnings, and takes the form printf "\x$1" } -The only supported directive is `disable`: +Supported directives are `disable` to disable warnings: # 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: -Silencing parser errors is purely cosmetic, and will not make ShellCheck continue. \ No newline at end of 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. \ No newline at end of file