Enable avoid_redundant_argument_values lint (#91409) (#91462)

This commit is contained in:
Ian Hickson
2021-10-08 09:25:14 -07:00
committed by GitHub
parent ac88d4ba5d
commit 61a0add286
667 changed files with 1694 additions and 3386 deletions

View File

@@ -274,7 +274,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
@override
Future<List<String>> discoverDevices() async {
final List<String> output = (await eval(adbPath, <String>['devices', '-l'], canFail: false))
final List<String> output = (await eval(adbPath, <String>['devices', '-l']))
.trim().split('\n');
final List<String> results = <String>[];
for (final String line in output) {
@@ -327,7 +327,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
// Restarting `adb` helps with keeping device connections alive. When `adb`
// runs non-stop for too long it loses connections to devices. There may be
// a better method, but so far that's the best one I've found.
await exec(adbPath, <String>['kill-server'], canFail: false);
await exec(adbPath, <String>['kill-server']);
}
}
@@ -555,7 +555,6 @@ class AndroidDevice extends Device {
adbPath,
<String>['-s', deviceId, ...arguments],
environment: environment,
canFail: false,
printStdout: !silent,
printStderr: !silent,
);

View File

@@ -224,7 +224,7 @@ Future<String> getDartVersion() async {
Future<String?> getCurrentFlutterRepoCommit() {
if (!dir('${flutterDirectory.path}/.git').existsSync()) {
return Future<String?>.value(null);
return Future<String?>.value();
}
return inDirectory<String>(flutterDirectory, () {