diff --git a/SC1061.md b/SC1061.md new file mode 100644 index 0000000..aeec1d1 --- /dev/null +++ b/SC1061.md @@ -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. \ No newline at end of file