mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-06 09:15:17 +08:00
Removed superfluous messages for [ cow]
This commit is contained in:
@@ -475,12 +475,7 @@ readCondition = called "test expression" $ do
|
||||
condition <- readConditionContents single
|
||||
|
||||
cpos <- getPosition
|
||||
close <- (try $ string "]]") <|> (string "]") <|> do
|
||||
let match = (if single then "]" else "]]")
|
||||
parseProblemAt opos ErrorC $ "Couldn't find matching " ++ match ++ "."
|
||||
parseProblem ErrorC $ "Expected " ++ match ++ "."
|
||||
fail "condition"
|
||||
|
||||
close <- (try $ string "]]") <|> (string "]")
|
||||
when (open == "[[" && close /= "]]") $ parseProblemAt cpos ErrorC "Did you mean ]] ?"
|
||||
when (open == "[" && close /= "]" ) $ parseProblemAt opos ErrorC "Did you mean [[ ?"
|
||||
return $ T_Condition id (if single then SingleBracket else DoubleBracket) condition
|
||||
|
Reference in New Issue
Block a user