Declare locals as final where not reassigned (dev) (#8574)
This commit is contained in:
@@ -9,9 +9,9 @@ import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
|
||||
Future<Null> main() async {
|
||||
String revision = await getCurrentFlutterRepoCommit();
|
||||
DateTime revisionTimestamp = await getFlutterRepoCommitTimestamp(revision);
|
||||
String dartSdkVersion = await getDartVersion();
|
||||
final String revision = await getCurrentFlutterRepoCommit();
|
||||
final DateTime revisionTimestamp = await getFlutterRepoCommitTimestamp(revision);
|
||||
final String dartSdkVersion = await getDartVersion();
|
||||
await task(createAnalyzerCliTest(
|
||||
sdk: dartSdkVersion,
|
||||
commit: revision,
|
||||
|
||||
@@ -9,9 +9,9 @@ import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
|
||||
Future<Null> main() async {
|
||||
String revision = await getCurrentFlutterRepoCommit();
|
||||
DateTime revisionTimestamp = await getFlutterRepoCommitTimestamp(revision);
|
||||
String dartSdkVersion = await getDartVersion();
|
||||
final String revision = await getCurrentFlutterRepoCommit();
|
||||
final DateTime revisionTimestamp = await getFlutterRepoCommitTimestamp(revision);
|
||||
final String dartSdkVersion = await getDartVersion();
|
||||
await task(createAnalyzerServerTest(
|
||||
sdk: dartSdkVersion,
|
||||
commit: revision,
|
||||
|
||||
@@ -12,11 +12,11 @@ import 'package:flutter_devicelab/framework/utils.dart';
|
||||
|
||||
void main() {
|
||||
task(() async {
|
||||
Device device = await devices.workingDevice;
|
||||
final Device device = await devices.workingDevice;
|
||||
await device.unlock();
|
||||
Directory appDir =
|
||||
final Directory appDir =
|
||||
dir(path.join(flutterDirectory.path, 'examples/flutter_gallery'));
|
||||
File benchmarkFile = file(path.join(appDir.path, 'hot_benchmark.json'));
|
||||
final File benchmarkFile = file(path.join(appDir.path, 'hot_benchmark.json'));
|
||||
rm(benchmarkFile);
|
||||
await inDirectory(appDir, () async {
|
||||
return await flutter('run',
|
||||
|
||||
@@ -39,7 +39,7 @@ const String _kBenchmarkKey = 'technical_debt_in_dollars';
|
||||
|
||||
Future<Null> main() async {
|
||||
await task(() async {
|
||||
Process git = await startProcess(
|
||||
final Process git = await startProcess(
|
||||
'git',
|
||||
<String>['ls-files', '--full-name', flutterDirectory.path],
|
||||
workingDirectory: flutterDirectory.path,
|
||||
@@ -47,7 +47,7 @@ Future<Null> main() async {
|
||||
double total = 0.0;
|
||||
await for (String entry in git.stdout.transform(UTF8.decoder).transform(const LineSplitter()))
|
||||
total += await findCostsForFile(new File(path.join(flutterDirectory.path, entry)));
|
||||
int gitExitCode = await git.exitCode;
|
||||
final int gitExitCode = await git.exitCode;
|
||||
if (gitExitCode != 0)
|
||||
throw new Exception('git exit with unexpected error code $gitExitCode');
|
||||
return new TaskResult.success(
|
||||
|
||||
Reference in New Issue
Block a user