Enable avoid_redundant_argument_values lint (#91409)

This commit is contained in:
Ian Hickson
2021-10-07 20:13:02 -07:00
committed by GitHub
parent 4bf7179e51
commit 5fd259be24
667 changed files with 1693 additions and 3385 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, () {