mirror of
https://github.com/flutter/packages.git
synced 2025-06-03 17:48:10 +08:00
Switch script/tools over to the new analysis options (#3777)
Removes the legacy analysis options override and fixes all resulting issues. This is a combination of dart fix and manual changes (mostly mechanical, but some small restructuring to address warnings more cleanly, such as creating typed structs from args when they are used repeatedly to avoid repeated casting, or making things that were unnecessarily public private). One small opportunistic extra cleanup is that the handling of null-safety prerelease versions is removed, as any new plugin would be written null-safe from the start, so we no longer need to allow those versions. Part of flutter/flutter#76229
This commit is contained in:
@ -14,10 +14,10 @@ import 'util.dart';
|
||||
|
||||
void main() {
|
||||
group('test drive_example_command', () {
|
||||
CommandRunner<Null> runner;
|
||||
CommandRunner<void> runner;
|
||||
RecordingProcessRunner processRunner;
|
||||
final String flutterCommand =
|
||||
LocalPlatform().isWindows ? 'flutter.bat' : 'flutter';
|
||||
const LocalPlatform().isWindows ? 'flutter.bat' : 'flutter';
|
||||
setUp(() {
|
||||
initializeFakePackages();
|
||||
processRunner = RecordingProcessRunner();
|
||||
@ -25,7 +25,7 @@ void main() {
|
||||
mockPackagesDir, mockFileSystem,
|
||||
processRunner: processRunner);
|
||||
|
||||
runner = CommandRunner<Null>(
|
||||
runner = CommandRunner<void>(
|
||||
'drive_examples_command', 'Test for drive_example_command');
|
||||
runner.addCommand(command);
|
||||
});
|
||||
@ -60,8 +60,8 @@ void main() {
|
||||
]),
|
||||
);
|
||||
|
||||
String deviceTestPath = p.join('test', 'plugin.dart');
|
||||
String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
final String deviceTestPath = p.join('test', 'plugin.dart');
|
||||
final String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
@ -105,8 +105,8 @@ void main() {
|
||||
]),
|
||||
);
|
||||
|
||||
String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
final String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
final String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
@ -173,7 +173,8 @@ void main() {
|
||||
]),
|
||||
);
|
||||
|
||||
String driverTestPath = p.join('test_driver', 'integration_test.dart');
|
||||
final String driverTestPath =
|
||||
p.join('test_driver', 'integration_test.dart');
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
@ -259,8 +260,8 @@ void main() {
|
||||
]),
|
||||
);
|
||||
|
||||
String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
final String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
final String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
@ -336,8 +337,8 @@ void main() {
|
||||
]),
|
||||
);
|
||||
|
||||
String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
final String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
final String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
@ -415,8 +416,8 @@ void main() {
|
||||
]),
|
||||
);
|
||||
|
||||
String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
final String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
final String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
@ -496,8 +497,8 @@ void main() {
|
||||
]),
|
||||
);
|
||||
|
||||
String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
final String deviceTestPath = p.join('test_driver', 'plugin.dart');
|
||||
final String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
@ -567,8 +568,8 @@ void main() {
|
||||
'--enable-experiment=exp1',
|
||||
]);
|
||||
|
||||
String deviceTestPath = p.join('test', 'plugin.dart');
|
||||
String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
final String deviceTestPath = p.join('test', 'plugin.dart');
|
||||
final String driverTestPath = p.join('test_driver', 'plugin_test.dart');
|
||||
print(processRunner.recordedCalls);
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
|
Reference in New Issue
Block a user