mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-27 17:38:49 +08:00
SC2323: Warn about redundant parens in a[(x+1)] and $(( ((x)) )) (ref: #1666)
This commit is contained in:
@@ -821,11 +821,13 @@ readArithmeticContents =
|
||||
return $ TA_Expansion id pieces
|
||||
|
||||
readGroup = do
|
||||
start <- startSpan
|
||||
char '('
|
||||
s <- readSequence
|
||||
char ')'
|
||||
id <- endSpan start
|
||||
spacing
|
||||
return s
|
||||
return $ TA_Parentesis id s
|
||||
|
||||
readArithTerm = readGroup <|> readVariable <|> readExpansion
|
||||
|
||||
|
Reference in New Issue
Block a user