diff --git a/dev/bots/analyze_sample_code.dart b/dev/bots/analyze_sample_code.dart index 2e7830819d..eb86843320 100644 --- a/dev/bots/analyze_sample_code.dart +++ b/dev/bots/analyze_sample_code.dart @@ -612,8 +612,17 @@ dependencies: sdk: flutter '''); + // Copy in the analysis options from the Flutter root. - File(path.join(_flutterRoot,'analysis_options.yaml')).copySync(path.join(directory.path, 'analysis_options.yaml')); + final File rootAnalysisOptions = File(path.join(_flutterRoot,'analysis_options.yaml')); + final File analysisOptions = File(path.join(directory.path, 'analysis_options.yaml')); + analysisOptions.writeAsStringSync(''' +include: ${rootAnalysisOptions.absolute.path} + +analyzer: + errors: + directives_ordering: ignore +'''); } /// Writes out a sample section to the disk and returns the file.