-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
Instead of opting generated_plugin_registrant.dart
out of a growing list of individual lints can we just exclude it from analysis altogether?
flutter/packages/flutter_tools/lib/src/plugins.dart
Lines 785 to 799 in fed35b4
// ignore_for_file: lines_longer_than_80_chars | |
{{#plugins}} | |
import 'package:{{name}}/{{file}}'; | |
{{/plugins}} | |
import 'package:flutter_web_plugins/flutter_web_plugins.dart'; | |
// ignore: public_member_api_docs | |
void registerPlugins(Registrar registrar) { | |
{{#plugins}} | |
{{class}}.registerWith(registrar); | |
{{/plugins}} | |
registrar.registerMessageHandler(); | |
} |
I imagine we could list it in the exclude
section [1] of the analyss_options_user.yaml
file.
It would break customers that have a custom analyzer options file with public_member_api_docs
and/or lines_longer_than_80_chars
enabled. They'd have to add a similar opt-out section to their options file. In the future, when we generate an analyss_options.yaml
file on flutter create
(see #78432) we could auto-include that.
This change would help with enabling dart-lang/sdk#35234. Currently, those generated ignores are not always ignoring a warning and hence trigger a warning that they are unused.
And it would also stop us from having to add more opt-outs to that file in the future.
[1] https://dart.dev/guides/language/analysis-options#excluding-files
[2] https://github.com/flutter/flutter/blob/master/packages/flutter/lib/analysis_options_user.yaml