Separate the 'if' expression from its statement (#9177)

This commit is contained in:
Alexandre Ardhuin
2017-04-04 21:45:50 +02:00
committed by GitHub
parent 0cf2f88f00
commit 189028a958
14 changed files with 41 additions and 21 deletions

View File

@@ -128,7 +128,8 @@ final ArgParser _argParser = new ArgParser()
);
bool _listsEqual(List<dynamic> a, List<dynamic> b) {
if (a.length != b.length) return false;
if (a.length != b.length)
return false;
for (int i = 0; i < a.length; i++) {
if (a[i] != b[i])

View File

@@ -384,7 +384,8 @@ String get adbPath {
final String adbPath = path.join(androidHome, 'platform-tools/adb');
if (!canRun(adbPath)) throw 'adb not found at: $adbPath';
if (!canRun(adbPath))
throw 'adb not found at: $adbPath';
return path.absolute(adbPath);
}

View File

@@ -101,7 +101,8 @@ Future<VMIsolateRef> _connectToRunnerIsolate(int vmServicePort) async {
final VM vm = await client.getVM();
final VMIsolateRef isolate = vm.isolates.single;
final String response = await isolate.invokeExtension('ext.cocoonRunnerReady');
if (response != 'ready') throw 'not ready yet';
if (response != 'ready')
throw 'not ready yet';
return isolate;
} catch (error) {
const Duration connectionTimeout = const Duration(seconds: 2);

View File

@@ -306,7 +306,8 @@ Directory get flutterDirectory => dir('../..').absolute;
String requireEnvVar(String name) {
final String value = Platform.environment[name];
if (value == null) fail('$name environment variable is missing. Quitting.');
if (value == null)
fail('$name environment variable is missing. Quitting.');
return value;
}
@@ -450,4 +451,4 @@ Future<int> findAvailablePort() async {
}
}
bool canRun(String path) => _processManager.canRun(path);
bool canRun(String path) => _processManager.canRun(path);

View File

@@ -112,7 +112,8 @@ class StartupTest {
]).timeout(_startupTimeout);
final Map<String, dynamic> data = JSON.decode(file('$testDirectory/build/start_up_info.json').readAsStringSync());
if (!reportMetrics) return new TaskResult.success(data);
if (!reportMetrics)
return new TaskResult.success(data);
return new TaskResult.success(data, benchmarkScoreKeys: <String>[
'timeToFirstFrameMicros',