From 6a3b52a497d2c9a5cfef48f2aa47733b839534f2 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sun, 8 Mar 2015 14:15:12 -0700 Subject: [PATCH] Updated SC2155 (markdown) --- SC2155.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SC2155.md b/SC2155.md index 25e5e94..d6f2fb9 100644 --- a/SC2155.md +++ b/SC2155.md @@ -21,3 +21,5 @@ If you intend to ignore the return value of an assignment, you can either ignore export foo foo=$(mycmd) || true + +Shellcheck does not warn about `export foo=bar` because `bar` is a literal and not a command substitution with an independent return value. It also does not warn about `local -r foo=$(cmd)`, where declaration and assignment must be in the same command. \ No newline at end of file