mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1069 (markdown)
22
SC1069.md
Normal file
22
SC1069.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
## You need a space before the [.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
if[ -e file ]
|
||||||
|
then echo "exists"; fi
|
||||||
|
```
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
if [ -e file ]
|
||||||
|
then echo "exists"; fi
|
||||||
|
```
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
ShellCheck found a keyword immediately followed by a `[`. There needs to be a space between them.
|
||||||
|
|
||||||
|
### Exceptions:
|
||||||
|
|
||||||
|
None
|
Reference in New Issue
Block a user