-
Notifications
You must be signed in to change notification settings - Fork 188
Conversation
The analyzer should not be trying to apply warnings to generated code, where the user can arbitrarily change settings and invalidate code that the user of the application can't do anything about. dart-lang/sdk#57261 although that's more the linter than analysis in general. The _keepAnalysisHappy variable is introduced precisely to fix this kind of problem, and it has a //ignore comment on it. The generated code may or may not use the defaultLocale, depending on what it's generating, so sometimes it would complain about that as being undefined. |
I now remember we've had a few issues discussion the topic :) I don't think we should endeavor to have generated code clean of lint issues where the lints are very subjective. Where the specific lints are used much more commonly, have low-false positive lints for common user issues, or are validating some recommended style guides, I think we should try and have generated code warning clean, or, have a clear reason why we should have an exception for the specific generated file. Let me update this PR a bit to eliminate the warning for |
I updated this to use the ~newer |
Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. PiperOrigin-RevId: 264686901
*** Reason for rollback *** Google Fiber application doesn't build: https://test.corp.google.com/ui#cl=264686901 *** Original change description *** Make Intl generated code pass most current lint options Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. *** PiperOrigin-RevId: 264727285
Trying this again, but reverted the "new" removal and one additional type in generated code, as the generated code is used in Dart 1 projects that are still active. Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. Cloned from CL 264686901 by 'g4 patch'. Original change by alanknight@alanknight:intl_maintenance:290:citc on 2019/08/21 14:02:13. PiperOrigin-RevId: 264925581
Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating #31 but then expanded. PiperOrigin-RevId: 264686901
*** Reason for rollback *** Google Fiber application doesn't build: https://test.corp.google.com/ui#cl=264686901 *** Original change description *** Make Intl generated code pass most current lint options Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating #31 but then expanded. *** PiperOrigin-RevId: 264727285
Trying this again, but reverted the "new" removal and one additional type in generated code, as the generated code is used in Dart 1 projects that are still active. Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating #31 but then expanded. Cloned from CL 264686901 by 'g4 patch'. Original change by alanknight@alanknight:intl_maintenance:290:citc on 2019/08/21 14:02:13. PiperOrigin-RevId: 264925581
Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. PiperOrigin-RevId: 264686901
*** Reason for rollback *** Google Fiber application doesn't build: https://test.corp.google.com/ui#cl=264686901 *** Original change description *** Make Intl generated code pass most current lint options Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. *** PiperOrigin-RevId: 264727285
Trying this again, but reverted the "new" removal and one additional type in generated code, as the generated code is used in Dart 1 projects that are still active. Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. Cloned from CL 264686901 by 'g4 patch'. Original change by alanknight@alanknight:intl_maintenance:290:citc on 2019/08/21 14:02:13. PiperOrigin-RevId: 264925581
Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. PiperOrigin-RevId: 264686901
*** Reason for rollback *** Google Fiber application doesn't build: https://test.corp.google.com/ui#cl=264686901 *** Original change description *** Make Intl generated code pass most current lint options Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. *** PiperOrigin-RevId: 264727285
Trying this again, but reverted the "new" removal and one additional type in generated code, as the generated code is used in Dart 1 projects that are still active. Mostly using ignore_for_file, but fixing a few of the most obvious issues Started out as integrating dart-archive/intl_translation#31 but then expanded. Cloned from CL 264686901 by 'g4 patch'. Original change by alanknight@alanknight:intl_maintenance:290:citc on 2019/08/21 14:02:13. PiperOrigin-RevId: 264925581
Fix two analysis warnings:
@alan-knight, these show up in Flutter user code, including in the examples for the flutter website (flutter/website#1036).