Created SC1061 (markdown)

Vidar Holen
2018-10-10 21:19:44 -07:00
parent 3644ffe43c
commit 326959a36c

31
SC1061.md Normal file

@@ -0,0 +1,31 @@
## Couldn't find 'done' for this 'do'.
### Problematic code:
```sh
yes() {
while echo "y"
do
true
}
```
### Correct code:
```sh
yes() {
while echo "y"
do
true
done
}
```
### Rationale:
ShellCheck found a `do` without a corresponding `done`.
Double check that the `done` exists, and that it correctly matches the indicated `do`. A companion warning [[SC1062]] is emitted where ShellCheck first noticed it was missing.
### Exceptions:
None.