From 326959a36c623a97c0c0f9adcf7aef5bcd79ca64 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Wed, 10 Oct 2018 21:19:44 -0700 Subject: [PATCH] Created SC1061 (markdown) --- SC1061.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 SC1061.md 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