From 45bf8c1a67aaa75cac39ce341408bfd2643d1e39 Mon Sep 17 00:00:00 2001 From: koalaman Date: Fri, 28 Mar 2014 19:01:34 -0700 Subject: [PATCH] Created SC1035 (markdown) --- SC1035.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 SC1035.md diff --git a/SC1035.md b/SC1035.md new file mode 100644 index 0000000..d9d594c --- /dev/null +++ b/SC1035.md @@ -0,0 +1,17 @@ +## You need a space here + +### Problematic code: + + if ![-z foo ]; then true; fi + +### Correct code: + + if ! [ -z foo ]; then true; fi + +### Rationale: + +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. + +### Contraindications + +None. \ No newline at end of file