Created SC1059 (markdown)

Vidar Holen
2022-10-19 20:33:18 -07:00
parent 7eca7aba7c
commit ff80970a83

34
SC1059.md Normal file

@@ -0,0 +1,34 @@
## Semicolon is not allowed directly after 'do'. You can just delete it.
### Problematic code:
```sh
while true; do; true; done
while true;
do;
true;
done;
```
### Correct code:
```sh
while true; do true; done
while true;
do
true;
done;
```
### Rationale:
Semicolon `;` is not allowed directly after a `do` keyword. Follow it directly with either a command or a linefeed as shown in the example.
### Exceptions:
None.
### Related resources:
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!