Forked from #32596 (comment).
AngularDart (and internally at Google) requires a better process for identifying, testing, and using lints than the one currently used right now (i.e. many varied contributions without requirements they conform with the style guide – often they are inventing style guide requirements that do not exist).
i.e. I’d like to be able to write (or similar):
# analysis_options.yaml linter: google # Use the Google style guide set of lints.
Internally, we might need a transitional set of lints that are not quite all of them:
# analysis_options.yaml linter: google-relaxed
Here are our requirements:
- The internal style team determines what lints match both
google-relaxed. It’s likely most of these lints already exist, but we should double check the implementations. We’d be linting 10s of millions of lines of code, so we need the quality bar to the extremely high (internally lints with a false-positive rating of >=0.5%% are automatically disabled).
- Automated performance testing avoids issues around IDE crashes or slowdowns.
- As lints are added to this list, we have adequate time to vet them on large code bases.
- Lints that are optional (i.e.
prefer) need to be excluded on existing code – i.e. we don’t want to force teams to have to write hundreds of
// ignore: x_x_xbecause they didn’t follow an optional rule.
Nice to have externally (we do this internally already):
- Lints can be enabled “just-in-time” – i.e. for presubmit/code review (instead of always on). This is probably a requirement for
4.above, anyway, because otherwise we wouldn’t have context on whether code is “new” or not.