Open pq opened 1 month ago
Agree on warning on __
etc.
The reason they are exempt no longer applies, you should just use _
everywhere.
+1 on warning on _
.
I don't know how much we care, but I wonder if it would be a useful step to have a fix that turns __
into the wildcard _
because I'm sure that's what users are trying to do in most cases.
Yes, we should definitely have a fix. And we should care a lot because such a fix will help users migrate seamlessly to whatever version this language feature ships in.
See also https://github.com/dart-lang/linter/issues/5048.
We'll want to pick how and where to nudge to use wildcards (and not do over do it!)
The current implementation special-cases all underscore variations:
With the wild card variables feature we might start reporting on
__
,___
, etc.Note that making this change may result in newly reported diagnostics. The impact could have some reach since this is a recommended lint.
/fyi @kallentu @bwilkerson