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