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