mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
SC2323: Warn about redundant parens in a[(x+1)] and $(( ((x)) )) (ref: #1666)
This commit is contained in:
parent
30bb0e0093
commit
52dac51cd4
5 changed files with 42 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue