diff --git a/SC2249.md b/SC2249.md index 3e1bdb1..8fb2d90 100644 --- a/SC2249.md +++ b/SC2249.md @@ -35,7 +35,7 @@ Consider adding a default case to handle other values. If you don't know what to The example is adapted from a real world Debian init script, which due to a missing default case reports success on any misspelled command (here with underscore instead of dash): -``` +```console $ /etc/init.d/screen-cleanup force_reload && echo success success ``` @@ -46,7 +46,7 @@ This suggestion only triggers in verbose mode (`-S verbose`). If you don't have a default case because the default should be to take no action, consider adding a comment to other humans: -``` +```sh case "$(uname)" in CYGWIN*) cygwin=1;; MINGW*) mingw=1;; @@ -56,7 +56,7 @@ esac If you believe that it's impossible for the expression to have any other value, it's considered good practice to add the equivalent of an `assert(0)` to fail fast if this assumption should turn out to be incorrect in the current or future versions: -``` +```sh case "$result" in true) proceed;; false) cancel;;