Skip to content

Commit

Permalink
Disable deprecation warnings for mega_gallery (#143466)
Browse files Browse the repository at this point in the history
Follow-up to flutter/flutter#143347.

As flutter/flutter#143403 uncovered, deprecation warnings were still enabled for the mega_gallery because it doesn't use the analysis_options.yaml file from the flutter root. This change injects a analysis_options.yaml file for the mega_gallery that disables those warnings.

Submitting this separately from flutter/flutter#143403 in case it affects the mega_gallery benchmark to get a clean new baseline before removing all the `deprecated_member_use` ignores.
  • Loading branch information
goderbauer authored Feb 14, 2024
1 parent 9bc8393 commit 1b8b430
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dev/tools/mega_gallery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@ void main(List<String> args) {
pubspec = pubspec.replaceAll('../../packages/flutter', '../../../packages/flutter');
_file(out, 'pubspec.yaml').writeAsStringSync(pubspec);

// Remove the (flutter_gallery specific) analysis_options.yaml file.
_file(out, 'analysis_options.yaml').deleteSync();
// Replace the (flutter_gallery specific) analysis_options.yaml file with a default one.
_file(out, 'analysis_options.yaml').writeAsStringSync(
'''
analyzer:
errors:
# See analysis_options.yaml in the flutter root for context.
deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore
'''
);

_file(out, '.dartignore').writeAsStringSync('');

Expand Down

0 comments on commit 1b8b430

Please sign in to comment.