mirror of
https://github.com/flutter/packages.git
synced 2025-05-30 21:17:42 +08:00
Fix analyzer issues (#3863)
* Make infos fatal when analyzing packages * Fix import ordering for updated analysis
This commit is contained in:
@ -70,7 +70,8 @@ class AnalyzeCommand extends PluginCommand {
|
||||
final List<String> failingPackages = <String>[];
|
||||
await for (final Directory package in getPlugins()) {
|
||||
final int exitCode = await processRunner.runAndStream(
|
||||
'dart', <String>['analyze'], workingDir: package);
|
||||
'dart', <String>['analyze', '--fatal-infos'],
|
||||
workingDir: package);
|
||||
if (exitCode != 0) {
|
||||
failingPackages.add(p.basename(package.path));
|
||||
}
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:file/file.dart';
|
||||
import 'package:git/git.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:pub_semver/pub_semver.dart';
|
||||
import 'package:pubspec_parse/pubspec_parse.dart';
|
||||
|
||||
|
@ -46,8 +46,10 @@ void main() {
|
||||
'flutter', const <String>['packages', 'get'], plugin1Dir.path),
|
||||
ProcessCall(
|
||||
'flutter', const <String>['packages', 'get'], plugin2Dir.path),
|
||||
ProcessCall('dart', const <String>['analyze'], plugin1Dir.path),
|
||||
ProcessCall('dart', const <String>['analyze'], plugin2Dir.path),
|
||||
ProcessCall('dart', const <String>['analyze', '--fatal-infos'],
|
||||
plugin1Dir.path),
|
||||
ProcessCall('dart', const <String>['analyze', '--fatal-infos'],
|
||||
plugin2Dir.path),
|
||||
]));
|
||||
});
|
||||
|
||||
@ -86,7 +88,8 @@ void main() {
|
||||
orderedEquals(<ProcessCall>[
|
||||
ProcessCall(
|
||||
'flutter', const <String>['packages', 'get'], pluginDir.path),
|
||||
ProcessCall('dart', const <String>['analyze'], pluginDir.path),
|
||||
ProcessCall('dart', const <String>['analyze', '--fatal-infos'],
|
||||
pluginDir.path),
|
||||
]));
|
||||
});
|
||||
|
||||
|
@ -9,8 +9,8 @@ import 'dart:io' as io;
|
||||
import 'package:args/command_runner.dart';
|
||||
import 'package:file/file.dart';
|
||||
import 'package:file/local.dart';
|
||||
import 'package:flutter_plugin_tools/src/publish_plugin_command.dart';
|
||||
import 'package:flutter_plugin_tools/src/common.dart';
|
||||
import 'package:flutter_plugin_tools/src/publish_plugin_command.dart';
|
||||
import 'package:git/git.dart';
|
||||
import 'package:matcher/matcher.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
|
@ -9,9 +9,9 @@ import 'dart:io' as io;
|
||||
import 'package:args/command_runner.dart';
|
||||
import 'package:file/file.dart';
|
||||
import 'package:file/memory.dart';
|
||||
import 'package:flutter_plugin_tools/src/common.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:platform/platform.dart';
|
||||
import 'package:flutter_plugin_tools/src/common.dart';
|
||||
import 'package:quiver/collection.dart';
|
||||
|
||||
// TODO(stuartmorgan): Eliminate this in favor of setting up a clean filesystem
|
||||
|
@ -8,11 +8,11 @@ import 'dart:io' as io;
|
||||
import 'package:args/command_runner.dart';
|
||||
import 'package:file/file.dart';
|
||||
import 'package:flutter_plugin_tools/src/common.dart';
|
||||
import 'package:flutter_plugin_tools/src/version_check_command.dart';
|
||||
import 'package:git/git.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
import 'package:test/test.dart';
|
||||
import 'package:flutter_plugin_tools/src/version_check_command.dart';
|
||||
import 'package:pub_semver/pub_semver.dart';
|
||||
import 'package:test/test.dart';
|
||||
import 'util.dart';
|
||||
|
||||
void testAllowedVersion(
|
||||
|
Reference in New Issue
Block a user