mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-19 21:03:51 -07:00
Hacked in place warnings for if [[ 1 ]] then :; fi
This commit is contained in:
parent
6e263e6b76
commit
6d2e739e09
1 changed files with 15 additions and 13 deletions
|
@ -478,6 +478,8 @@ readCondition = called "test expression" $ do
|
|||
close <- (try $ string "]]") <|> (string "]")
|
||||
when (open == "[[" && close /= "]]") $ parseProblemAt cpos ErrorC "Did you mean ]] ?"
|
||||
when (open == "[" && close /= "]" ) $ parseProblemAt opos ErrorC "Did you mean [[ ?"
|
||||
spacing
|
||||
many readCmdWord -- Read and throw away remainders to get then/do warnings. Fixme?
|
||||
return $ T_Condition id (if single then SingleBracket else DoubleBracket) condition
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue