googlearchive / pedantic

How to get the most value from Dart static analysis
https://pub.dev/packages/pedantic
BSD 3-Clause "New" or "Revised" License
324 stars 56 forks source link

Should unnecessary_new be included in the lints? #18

Closed thosakwe closed 5 years ago

thosakwe commented 5 years ago

Because new is optional in Dart 2, does it make sense to discourage its usage? Also I guess that by extension, if unnecessary_new were included, then that would imply that unnecessary_const should also be included.

Do you think this that this is a worthwhile addition, or unnecessary?

davidmorgan commented 5 years ago

Yes, unnecessary_new will be added soon.

package:pedantic gives the set of lints that are enforced internally at google. We're currently putting more effort into enforcing new lints (which involves cleaning up all the code we have, first), so you can expect to see quite a few new lints soon.

We are currently undecided on unnecessary_const; it's more complex than unnecessary_new. We'll likely focus on other, more obviously useful, lints first.