From b4b919073ac5fbe68fb114ccb848906c0dd7b682 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sat, 17 Feb 2018 22:15:16 -0800 Subject: [PATCH] Created SC1130 (markdown) --- SC1130.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 SC1130.md diff --git a/SC1130.md b/SC1130.md new file mode 100644 index 0000000..53e7dc6 --- /dev/null +++ b/SC1130.md @@ -0,0 +1,24 @@ +## You need a space before the :. + +### Problematic code: + +```sh +until make +do:; done +``` + +### Correct code: + +```sh +until make +do :; done +``` +### Rationale: + +ShellCheck found a keyword immediately followed by a `:`. `:` is a synonym for `true`, the command that "does nothing, successfully", and as a command name it needs a space. + +`do:` is as invalid as `dotrue`. Use `do :`, or preferably, `do true` for readability. + +### Exceptions: + +None \ No newline at end of file