mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 13:01:39 -07:00
Warn about [ x -ot y ] in POSIX mode
This commit is contained in:
parent
5962b01816
commit
e701cf6fad
1 changed files with 1 additions and 1 deletions
|
@ -205,7 +205,7 @@ checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
|||
| op `elem` [ "<", ">", "\\<", "\\>", "<=", ">=", "\\<=", "\\>="] =
|
||||
unless isDash $ warnMsg id $ "lexicographical " ++ op ++ " is"
|
||||
bashism (TC_Binary id SingleBracket op _ _)
|
||||
| op `elem` [ "-nt", "-ef" ] =
|
||||
| op `elem` [ "-ot", "-nt", "-ef" ] =
|
||||
unless isDash $ warnMsg id $ op ++ " is"
|
||||
bashism (TC_Binary id SingleBracket "==" _ _) =
|
||||
warnMsg id "== in place of = is"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue