Skip to content

Commit 1b8b430

Browse files
authored
Disable deprecation warnings for mega_gallery (#143466)
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.
1 parent 9bc8393 commit 1b8b430

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

dev/tools/mega_gallery.dart

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,16 @@ void main(List<String> args) {
8585
pubspec = pubspec.replaceAll('../../packages/flutter', '../../../packages/flutter');
8686
_file(out, 'pubspec.yaml').writeAsStringSync(pubspec);
8787

88-
// Remove the (flutter_gallery specific) analysis_options.yaml file.
89-
_file(out, 'analysis_options.yaml').deleteSync();
88+
// Replace the (flutter_gallery specific) analysis_options.yaml file with a default one.
89+
_file(out, 'analysis_options.yaml').writeAsStringSync(
90+
'''
91+
analyzer:
92+
errors:
93+
# See analysis_options.yaml in the flutter root for context.
94+
deprecated_member_use: ignore
95+
deprecated_member_use_from_same_package: ignore
96+
'''
97+
);
9098

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

0 commit comments

Comments
 (0)