VeryGoodOpenSource/very_good_analysis

Add recommended lints that are missing from the package

dmiedev opened this issue · 1 comments

Hey,

I've noticed there are three lints that are recommended by Flutter team through the flutter_lints package but are missing from the very_good_analysis package:

  • no_leading_underscores_for_library_prefixes
  • no_leading_underscores_for_local_identifiers
  • depend_on_referenced_packages

Could they get potentially added into the package? Or is there a reason they aren't included? They're pretty unharmful, from my point of view. Anyway, thanks in advance for considering my suggestion.

Cheers!

To keep this package in sync with original linter rules it might be a good idea to do:

include: package:flutter_lints/flutter.yaml

So that all base rules are always up to date with package:flutter_lints and package:lints (package:flutter_lints already includes lints). Then just add missing rules to linter.rules:

linter:
  rules:
   - very_good_rules

It might be also a good idea to mentions, somewhere in the docs, that very_good_analysis is a superset of package:flutter_lints/flutter.yaml.

I'm new to Flutter and it took me a while to understand what very_good_analysis really is. I wasn't sure whether it is an opinionated set of rules developed by Very Good Ventures or is it rather based on "original" linter rules. It turned out to be the latter.

I had to write a little script that does w diff on 2 rules sets to figure it out ;)