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
Here's a snippet or screenshot that shows the problem:
This is just a small example, please read More details section below.
#!/bin/sh
[ -k foo ]
Here's what shellcheck currently says:
No issues detected!
Here's what I wanted or expected to see:
In POSIX sh, -k is undefined.
(Or something similar.)
More details
Shellcheck does not emit warnings for the non-POSIX operators -nt, -ef, -k, -o, <, and > when using a #!/bin/sh shebang or --shell sh.
Shellcheck already emits warnings for non-POSIX syntax (example 1, example 2). It would be useful if shellcheck could also warn for these non-POSIX operators, when the sh shell is specified.
The text was updated successfully, but these errors were encountered:
For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
This is just a small example, please read More details section below.
Here's what shellcheck currently says:
No issues detected!
Here's what I wanted or expected to see:
In POSIX sh, -k is undefined.
(Or something similar.)
More details
Shellcheck does not emit warnings for the non-POSIX operators
-nt
,-ef
,-k
,-o
,<
, and>
when using a#!/bin/sh
shebang or--shell sh
.Shellcheck already emits warnings for non-POSIX syntax (example 1, example 2). It would be useful if shellcheck could also warn for these non-POSIX operators, when the
sh
shell is specified.The text was updated successfully, but these errors were encountered: