You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That doesn't answer my question.
The title of the issue and the code example differs. It's hard to follow.
I don't really see how shellcheck could behave different. You asked it to use sh/posix mode and then check one variable and want another one to be included too?
SamuelMarks
changed the title
[SC3028] In a if [ -n BASH_SOURCE ] block don't warn of BASH_SOURCE being undefined
[SC3028] When using if [ ! -z "${BASH_VERSION+x}" ] don't warn of using bash features like set -o pipefail or BASH_SOURCEJan 8, 2025
For bugs
shellcheck --version
or "online"): 0.10.0For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
When I remove the comments it says:
Here's what I wanted or expected to see:
No error
FYI: Similar errors occur with pipefail:
The text was updated successfully, but these errors were encountered: