-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
dart-archive/linter
#3887Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestdevexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-false-negativeIssues related to lint rules that fail to report a problem.Issues related to lint rules that fail to report a problem.
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.
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestdevexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-false-negativeIssues related to lint rules that fail to report a problem.Issues related to lint rules that fail to report a problem.