Pattern: Use of extra parentheses
Issue: -
ShellCheck found an entire arithmetic expression wrapped in parentheses. This does not serve a purpose since the expression is already clearly delimited by the construct it's in, such as array[..]=
or $((..))
in the example.
Example of incorrect code:
array[(x+1)]=val
echo $(( (x+1) ))
Example of correct code:
array[x+1]=val
echo $((x+1))