Closed
Description
Some examples of what it currently misses but should lint:
Int64((12 * 60 * 60)) // ArgumentList(BinaryExpression)
`a.compareTo((b.bar))` // ArgumentList(MethodInvocation)
foo.addAll((await fut)) // ArgumentList(AwaitExpression)
`'${(foo == bar.baz)}' // InterpolationExpression(BinaryExpression)
So I would like to introduce a rule that
${( )}
and(( ))
are never OK, drop the inner ones.
It's just that it's a bit tricky to find in the language what exactly constitutes these doubled parentheses. For example:
ArgumentList
with length of 1 is always an extra set of parentheses
(which already covers almost all bad cases for this issue).- So is an
if
statement, but somehow I can't trigger any false negative with it.
I will immediately open a pull request that would address this issue.