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
As mentioned in the linked wiki page (SC2292) this is an optional check and must be activated explicit, shellcheck.net is operating in a "default mode".
Suggestions for changes to shellcheck.net is better discussed at that issue board - for instance adding a checkbox or something for "enable all optinal rules" or something.
shellcheck -o require-double-brackets myscript.sh
name: require-double-brackets
desc: Require [[ and warn about [ in Bash/Ksh
example: [ -e /etc/issue ]
fix: [[ -e /etc/issue ]]
For new checks and feature suggestions
Update: https://www.shellcheck.net/wiki/SC2292 is similar (Does it apply to
test
as well? I'd assume so…), but is not enabled at https://www.shellcheck.net/. Do we need an "all rules enabled" version of that page linked from the issue template?Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Rationale:
[[
is generally safer and saner than[
/test
. See for example[[
Is a Builtin, But[[
Is Part of the Language and What is the difference between test,[
and[[
?.The text was updated successfully, but these errors were encountered: