From 4f0d2fcb1a758e7a3fce64e18e507590c44da03a Mon Sep 17 00:00:00 2001 From: John Gardner Date: Wed, 22 Dec 2021 19:18:14 +1100 Subject: [PATCH] Add highlighting to code-blocks --- SC1020.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/SC1020.md b/SC1020.md index a8e437d..0e0580f 100644 --- a/SC1020.md +++ b/SC1020.md @@ -2,13 +2,13 @@ ### Problematic code: -``` +```sh if [ "$STUFF" = ""]; then ``` ### Correct code: -``` +```sh if [ "$STUFF" = "" ]; then ``` @@ -16,11 +16,10 @@ if [ "$STUFF" = "" ]; then Bourne shells are very whitespace sensitive. Adding or removing spaces can drastically alter the meaning of a script. In these cases, ShellCheck has noticed that you're missing a space at the position indicated. ### Exceptions -none. +None. ### Ignore -``` +```sh # shellcheck disable=SC1020 if [ "$STUFF" = ""]; then -... -``` \ No newline at end of file +```