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:
stuartmorgan
2021-04-06 13:04:25 -07:00
committed by GitHub
parent 5ea4d5fdfc
commit 3d9e523218
35 changed files with 675 additions and 652 deletions

View File

@ -12,7 +12,7 @@ import 'util.dart';
void main() {
group('$CreateAllPluginsAppCommand', () {
CommandRunner<Null> runner;
CommandRunner<void> runner;
FileSystem fileSystem;
Directory testRoot;
Directory packagesDir;
@ -22,7 +22,7 @@ void main() {
// Since the core of this command is a call to 'flutter create', the test
// has to use the real filesystem. Put everything possible in a unique
// temporary to minimize affect on the host system.
fileSystem = LocalFileSystem();
fileSystem = const LocalFileSystem();
testRoot = fileSystem.systemTempDirectory.createTempSync();
packagesDir = testRoot.childDirectory('packages');
@ -32,7 +32,7 @@ void main() {
pluginsRoot: testRoot,
);
appDir = command.appDirectory;
runner = CommandRunner<Null>(
runner = CommandRunner<void>(
'create_all_test', 'Test for $CreateAllPluginsAppCommand');
runner.addCommand(command);
});