Updated SC2155 (markdown)

Vidar Holen
2021-11-06 15:37:51 -07:00
parent 54b3184582
commit 763d93dafb

@@ -19,7 +19,7 @@ In the original code, the return value of `mycmd` is ignored, and `export` will
When first marked for export and assigned separately, the return value of the assignment will be that of `mycmd`. This avoids the problem.
Note that ShellCheck does not warn about masking of local read-only variables, such as `local -r foo=$(cmd)`, even though this also masks the return value. This is because the alternative `local foo; foo=$(cmd); local -r foo` is repetitive and cumbersome.
Note that ShellCheck does not warn about masking of local read-only variables, such as `local -r foo=$(cmd)`, even though this also masks the return value. This is because the alternative `local foo; foo=$(cmd); local -r foo` is repetitive and cumbersome. To see warnings for this and many other additional cases of suppressed exit codes, enable `check-extra-masked-returns`.
#### Exceptions: