lint unnecessary_const on samples (#21155)

This commit is contained in:
Alexandre Ardhuin
2018-09-07 09:13:13 +02:00
committed by GitHub
parent c599f99584
commit 3c58195350
12 changed files with 51 additions and 45 deletions

View File

@@ -107,6 +107,7 @@ Future<Null> main(List<String> arguments) async {
try {
final File mainDart = new File(path.join(tempDir.path, 'main.dart'));
final File pubSpec = new File(path.join(tempDir.path, 'pubspec.yaml'));
final File analysisOptions = new File(path.join(tempDir.path, 'analysis_options.yaml'));
Directory flutterPackage;
if (arguments.length == 1) {
// Used for testing.
@@ -212,6 +213,11 @@ dependencies:
sdk: flutter
flutter_test:
sdk: flutter
''');
analysisOptions.writeAsStringSync('''
linter:
rules:
- unnecessary_const
''');
print('Found $sampleCodeSections sample code sections.');
final Process process = await Process.start(