From 3f237e80624228d6a122e5e9e69c5a9f10f753b7 Mon Sep 17 00:00:00 2001 From: wileyhy <84648683+wileyhy@users.noreply.github.com> Date: Sat, 5 Oct 2024 23:47:39 -0700 Subject: [PATCH] Added an exception with a URL link to POSIX-2018. --- SC1010.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SC1010.md b/SC1010.md index d022d1e..7ba754b 100644 --- a/SC1010.md +++ b/SC1010.md @@ -35,3 +35,6 @@ In the example, `echo "$f" done` is the same as `echo "$f" "done"`, and the `don ### Exceptions If you're intentionally using `done` as a literal, you can quote it to make this clear to ShellCheck (and also human readers), e.g. instead of `echo Task is done`, use `echo "Task is done"`. This makes no difference to the shell, but it will silence this warning. + +From POSIX-2018, section "C.2.10 Shell Grammar," regarding the syntax, `if (false) then (echo x) else (echo y) fi`: +https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_10