mirror of
https://github.com/flutter/packages.git
synced 2025-06-19 13:38:53 +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:
@ -27,7 +27,7 @@ import 'version_check_command.dart';
|
||||
import 'xctest_command.dart';
|
||||
|
||||
void main(List<String> args) {
|
||||
final FileSystem fileSystem = const LocalFileSystem();
|
||||
const FileSystem fileSystem = LocalFileSystem();
|
||||
|
||||
Directory packagesDir = fileSystem
|
||||
.directory(p.join(fileSystem.currentDirectory.path, 'packages'));
|
||||
@ -41,7 +41,7 @@ void main(List<String> args) {
|
||||
}
|
||||
}
|
||||
|
||||
final CommandRunner<Null> commandRunner = CommandRunner<Null>(
|
||||
final CommandRunner<void> commandRunner = CommandRunner<void>(
|
||||
'pub global run flutter_plugin_tools',
|
||||
'Productivity utils for hosting multiple plugins within one repository.')
|
||||
..addCommand(AnalyzeCommand(packagesDir, fileSystem))
|
||||
@ -61,7 +61,7 @@ void main(List<String> args) {
|
||||
..addCommand(XCTestCommand(packagesDir, fileSystem));
|
||||
|
||||
commandRunner.run(args).catchError((Object e) {
|
||||
final ToolExit toolExit = e;
|
||||
final ToolExit toolExit = e as ToolExit;
|
||||
io.exit(toolExit.exitCode);
|
||||
}, test: (Object e) => e is ToolExit);
|
||||
}
|
||||
|
Reference in New Issue
Block a user