From 8184ef1e8b47c635ab44b86d67a0e969ed8be00a Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Mon, 3 Jul 2017 12:22:19 -0700 Subject: [PATCH] Don't complain about missing space in {( (#937) --- ShellCheck/Parser.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index cd2c447..dfd48fa 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -2063,10 +2063,13 @@ readSubshell = called "explicit subshell" $ do prop_readBraceGroup = isOk readBraceGroup "{ a; b | c | d; e; }" prop_readBraceGroup2 = isWarning readBraceGroup "{foo;}" +prop_readBraceGroup3 = isOk readBraceGroup "{(foo)}" readBraceGroup = called "brace group" $ do id <- getNextId char '{' - allspacingOrFail <|> parseProblem ErrorC 1054 "You need a space after the '{'." + void allspacingOrFail <|> optional (do + lookAhead $ noneOf "(" -- {( is legal + parseProblem ErrorC 1054 "You need a space after the '{'.") optional $ do pos <- getPosition lookAhead $ char '}'