dart-archive / isolate

Makes working with Dart isolates easier.
https://pub.dev/packages/isolate
BSD 3-Clause "New" or "Revised" License
90 stars 34 forks source link

fix pedantic lints #37

Closed kevmoo closed 4 years ago

lrhn commented 4 years ago

Please do not enforce pedantic lints on non-google3 code.

In particular, the "single quotes" lint is not part of the style guide, and should not be enforced.

jakemac53 commented 4 years ago

package:pedantic is the set of internally enforced lints, and external repositories are not intended to be a workaround to avoid those lints.

All external repositories under dart-lang should be enforcing the exact same lints as are enforced internally. That means enforcing package:pedantic.

lrhn commented 4 years ago

The packages are precisely third-party packages, not google3 packages. They are not google3-internal code. They are not intended to be google3 packages, they are available to everybody in the Dart ecosystem.

The Dart SDK does not use package:pedantic, and the dart-lang packages are also not required to. Some may have been changed to do so, but that happened at a time when pedantic was less controversial. With the additions to pedantic v1.9.0, there is now reasonable opposition to using it outside of google3.

We can choose to make the packages under dart-lang/ all use the google3 rules, but it is not a given that we want to. We may want to pick a different (and likely smaller) set of base lints than pedantic. Until that is actually decided, I'd prefer that we don't start changing code against the wishes of the authors. I don't want to have to change it back.

jakemac53 commented 4 years ago

The distinction isn't that this is google3 code, its that it is google code. These are all google projects, written and maintained by google. Not an individual. You should not have to learn different coding styles when contributing to different projects written in the same language and all owned by google, yet that is very much the case today for Dart. This is precisely due to a historic lack of enforcement, which is exactly the problem that package:pedantic solves.

Individual style preference simply is not relevant when ownership of code could change from one person to another at any time. Being developed as open source code doesn't change that.

Feedback on the lints that are enforced should be given by filing issues on package:pedantic and starting the discussions from there. That way any decisions made are applied consistently across all Dart projects at Google.