Warn about [ x -ot y ] in POSIX mode
This commit is contained in:
parent
5962b01816
commit
e701cf6fad
|
@ -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…
Reference in New Issue