From 4de286c01c98a93a326da4f885deb3781bc0cd65 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 19 May 2019 13:19:33 -0700 Subject: [PATCH] Updated SC1075 (markdown) --- SC1075.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SC1075.md b/SC1075.md index 2b38553..2f2274d 100644 --- a/SC1075.md +++ b/SC1075.md @@ -30,7 +30,9 @@ Many languages allow alternate branches with `else if`, but `sh` is not one of t ### Exceptions: -`else if` is a valid (though confusing) way of nesting an `if` statement in a parent's `else`. If this is your intention, please use canonical formatting and put a linefeed between `else` and `if`. +`else if` is a valid (though confusing) way of nesting an `if` statement in a parent's `else`. If this is your intention, consider using canonical formatting by putting a linefeed between `else` and `if`. + +This does not change the behavior of the script, but merely makes it more obvious to ShellCheck (and other humans) that you didn't expect the `else if` to behave the way it does in C. Alternatively, you can [[ignore]] it with no ill effects. ```sh