From cc81bdee31fdf6e9ff90be19f8619307db401358 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Mon, 27 Jul 2020 18:44:07 -0700 Subject: [PATCH] Improve SC1033/SC1034 message --- src/ShellCheck/Parser.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs index bb27ea3..e5b10f4 100644 --- a/src/ShellCheck/Parser.hs +++ b/src/ShellCheck/Parser.hs @@ -945,8 +945,8 @@ readCondition = called "test expression" $ do cpos <- getPosition close <- try (string "]]") <|> string "]" <|> fail "Expected test to end here (don't wrap commands in []/[[]])" id <- endSpan start - when (open == "[[" && close /= "]]") $ parseProblemAt cpos ErrorC 1033 "Did you mean ]] ?" - when (open == "[" && close /= "]" ) $ parseProblemAt opos ErrorC 1034 "Did you mean [[ ?" + when (open == "[[" && close /= "]]") $ parseProblemAt cpos ErrorC 1033 "Test expression was opened with double [[ but closed with single ]. Make sure they match." + when (open == "[" && close /= "]" ) $ parseProblemAt opos ErrorC 1034 "Test expression was opened with single [ but closed with double ]]. Make sure they match." optional $ lookAhead $ do pos <- getPosition notFollowedBy2 readCmdWord <|>