With the new dev build we've got the updated linter and so can use the `@optionalTypeArgs` annotation (in `meta 0.12.0`).
Bonus: this lets us clean up one more Regexp in the `analyze` command! :)
* run pub for analyze and test
* don't run pub when doing repo analysis
* move logic for when to run pub into the commands
* re-write ternary expression
The push to dev-4 allows us to cleanup a few more bits:
* `api_docs` lint message special casing (lint fixed)
* `allowedIdentifiersPattern` (lint fixed)
* Enable the lint require documentation.
* Track how many public Flutter members lack docs
* Rename the .analysis_options file
This makes Atom happier in the flutter_tools package.
Removing some special-casing in pursuit of aligning `flutter analyze` output with that provided by server/IDEs. Specifically:
* strong-hints (stale, no longer supported)
* "analyzer says" comment handling in favor of `//ignore`s
* `conflictingNamePattern` --- no longer needed
Next up some of the error filter regexps...
Well, all the easy ones, anyway.
For some reason `// ignore:` isn't working for me so I've disabled
lints that need that. Also disabled those that require a ton of work
(which I'm doing, but not in this PR, to keep it reviewable).
This adds:
- avoid_init_to_null
- library_names
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- sort_constructors_first
- sort_unnamed_constructors_first
- unnecessary_getters_setters
Migrates error suppression from regexps to analysis options.
* Ignore TODOs.
* Ignore strong mode field and method overrides (see `InvalidFieldOverride` and `InvalidMethodOverride` in `strong/info.dart`.
* Remove stale regexp to capture refs to dead `dart:ui_internals` URI.
* Remove stale regexp to capture dead strong mode "will need runtime check to cast to type" error (https://github.com/dart-lang/sdk/issues/24542).
5 regexp downs, another small handful (~4) to go! :)
This enables us to exclude `library_names` pending a new stable SDK push (see notes: https://github.com/flutter/flutter/pull/1996). Also excluded are a few lints who's feedback was just getting regexp'ed out. Moving forward, this will allow us to selectively enable specific lints of interest as well.