Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off directives_ordering lint when analyzing samples #81698

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion dev/bots/analyze_sample_code.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
''');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will this do in dartpad?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't do anything in dartpad, which is why I filed #81697 to fix the ordering as part of publishing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this PR: #81873

}

/// Writes out a sample section to the disk and returns the file.
Expand Down