mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1035 (markdown)
17
SC1035.md
Normal file
17
SC1035.md
Normal file
@@ -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.
|
Reference in New Issue
Block a user