mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-20 18:59:23 +08:00
Hacked in place warnings for if [[ 1 ]] then :; fi
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user