diff --git a/SC2317.md b/SC2317.md index 92afb80..3279cb8 100644 --- a/SC2317.md +++ b/SC2317.md @@ -39,7 +39,7 @@ ShellCheck may incorrectly believe that code is unreachable if it's invoked by v Note in particular that since unreachable commands may come in clusters, it's useful to use ShellCheck's filewide or functionwide ignore directives. A `disable` directive before a function ignores the entire function: -``` +```sh #!/bin/bash ... # shellcheck disable=SC2317 # Don't warn about unreachable commands in this function @@ -52,7 +52,7 @@ exit 0 ``` A disable directive after the shebang, before any commands, will ignore the entire file: -``` +```sh #!/bin/bash # Test script #1 # shellcheck disable=SC2317 # Don't warn about unreachable commands in this file