mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1129 (markdown)
22
SC1129.md
Normal file
22
SC1129.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
## You need a space before the !.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
while! [ -f file ]
|
||||||
|
do sleep 1; done
|
||||||
|
```
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
while ! [ -f file ]
|
||||||
|
do sleep 1; done
|
||||||
|
```
|
||||||
|
### 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