enable lint prefer_equal_for_default_values (#18156)
This commit is contained in:
committed by
GitHub
parent
6be81ebf9b
commit
09276bea25
@@ -144,7 +144,7 @@ class _TaskRunner {
|
||||
/// A result of running a single task.
|
||||
class TaskResult {
|
||||
/// Constructs a successful result.
|
||||
TaskResult.success(this.data, {this.benchmarkScoreKeys: const <String>[]})
|
||||
TaskResult.success(this.data, {this.benchmarkScoreKeys = const <String>[]})
|
||||
: this.succeeded = true,
|
||||
this.message = 'success' {
|
||||
const JsonEncoder prettyJson = const JsonEncoder.withIndent(' ');
|
||||
|
||||
@@ -22,7 +22,7 @@ const Duration taskTimeoutWithGracePeriod = const Duration(minutes: 26);
|
||||
///
|
||||
/// Running the task in [silent] mode will suppress standard output from task
|
||||
/// processes and only print standard errors.
|
||||
Future<Map<String, dynamic>> runTask(String taskName, { bool silent: false }) async {
|
||||
Future<Map<String, dynamic>> runTask(String taskName, { bool silent = false }) async {
|
||||
final String taskExecutable = 'bin/tasks/$taskName.dart';
|
||||
|
||||
if (!file(taskExecutable).existsSync())
|
||||
|
||||
@@ -231,7 +231,7 @@ Future<int> exec(
|
||||
String executable,
|
||||
List<String> arguments, {
|
||||
Map<String, String> environment,
|
||||
bool canFail: false,
|
||||
bool canFail = false,
|
||||
}) async {
|
||||
final Process process = await startProcess(executable, arguments, environment: environment);
|
||||
|
||||
@@ -266,7 +266,7 @@ Future<String> eval(
|
||||
String executable,
|
||||
List<String> arguments, {
|
||||
Map<String, String> environment,
|
||||
bool canFail: false,
|
||||
bool canFail = false,
|
||||
}) async {
|
||||
final Process process = await startProcess(executable, arguments, environment: environment);
|
||||
|
||||
@@ -297,8 +297,8 @@ Future<String> eval(
|
||||
}
|
||||
|
||||
Future<int> flutter(String command, {
|
||||
List<String> options: const <String>[],
|
||||
bool canFail: false,
|
||||
List<String> options = const <String>[],
|
||||
bool canFail = false,
|
||||
Map<String, String> environment,
|
||||
}) {
|
||||
final List<String> args = <String>[command]..addAll(options);
|
||||
@@ -308,8 +308,8 @@ Future<int> flutter(String command, {
|
||||
|
||||
/// Runs a `flutter` command and returns the standard output as a string.
|
||||
Future<String> evalFlutter(String command, {
|
||||
List<String> options: const <String>[],
|
||||
bool canFail: false,
|
||||
List<String> options = const <String>[],
|
||||
bool canFail = false,
|
||||
Map<String, String> environment,
|
||||
}) {
|
||||
final List<String> args = <String>[command]..addAll(options);
|
||||
|
||||
@@ -12,13 +12,13 @@ import '../framework/framework.dart';
|
||||
import '../framework/ios.dart';
|
||||
import '../framework/utils.dart';
|
||||
|
||||
TaskFunction createGalleryTransitionTest({ bool semanticsEnabled: false }) {
|
||||
TaskFunction createGalleryTransitionTest({ bool semanticsEnabled = false }) {
|
||||
return new GalleryTransitionTest(semanticsEnabled: semanticsEnabled);
|
||||
}
|
||||
|
||||
class GalleryTransitionTest {
|
||||
|
||||
GalleryTransitionTest({ this.semanticsEnabled: false });
|
||||
GalleryTransitionTest({ this.semanticsEnabled = false });
|
||||
|
||||
final bool semanticsEnabled;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import '../framework/utils.dart';
|
||||
final Directory _editedFlutterGalleryDir = dir(path.join(Directory.systemTemp.path, 'edited_flutter_gallery'));
|
||||
final Directory flutterGalleryDir = dir(path.join(flutterDirectory.path, 'examples/flutter_gallery'));
|
||||
|
||||
TaskFunction createHotModeTest({ bool isPreviewDart2: true }) {
|
||||
TaskFunction createHotModeTest({ bool isPreviewDart2 = true }) {
|
||||
return () async {
|
||||
final Device device = await devices.workingDevice;
|
||||
await device.unlock();
|
||||
|
||||
@@ -23,7 +23,7 @@ TaskFunction createMicrobenchmarkTask() {
|
||||
final Device device = await devices.workingDevice;
|
||||
await device.unlock();
|
||||
|
||||
Future<Map<String, double>> _runMicrobench(String benchmarkPath, {bool previewDart2: true}) async {
|
||||
Future<Map<String, double>> _runMicrobench(String benchmarkPath, {bool previewDart2 = true}) async {
|
||||
Future<Map<String, double>> _run() async {
|
||||
print('Running $benchmarkPath');
|
||||
final Directory appDir = dir(
|
||||
@@ -86,9 +86,9 @@ TaskFunction createMicrobenchmarkTask() {
|
||||
}
|
||||
|
||||
Future<Process> _startFlutter({
|
||||
String command: 'run',
|
||||
List<String> options: const <String>[],
|
||||
bool canFail: false,
|
||||
String command = 'run',
|
||||
List<String> options = const <String>[],
|
||||
bool canFail = false,
|
||||
Map<String, String> environment,
|
||||
}) {
|
||||
final List<String> args = <String>['run']..addAll(options);
|
||||
|
||||
@@ -108,7 +108,7 @@ TaskFunction createBasicMaterialCompileTest() {
|
||||
class StartupTest {
|
||||
static const Duration _startupTimeout = const Duration(minutes: 5);
|
||||
|
||||
const StartupTest(this.testDirectory, { this.reportMetrics: true });
|
||||
const StartupTest(this.testDirectory, { this.reportMetrics = true });
|
||||
|
||||
final String testDirectory;
|
||||
final bool reportMetrics;
|
||||
@@ -221,7 +221,7 @@ class CompileTest {
|
||||
);
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> _compileAot({ bool previewDart2: true }) async {
|
||||
static Future<Map<String, dynamic>> _compileAot({ bool previewDart2 = true }) async {
|
||||
// Generate blobs instead of assembly.
|
||||
await flutter('clean');
|
||||
final Stopwatch watch = new Stopwatch()..start();
|
||||
@@ -258,7 +258,7 @@ class CompileTest {
|
||||
return metrics;
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> _compileApp({ bool previewDart2: true }) async {
|
||||
static Future<Map<String, dynamic>> _compileApp({ bool previewDart2 = true }) async {
|
||||
await flutter('clean');
|
||||
final Stopwatch watch = new Stopwatch();
|
||||
int releaseSizeInBytes;
|
||||
@@ -299,7 +299,7 @@ class CompileTest {
|
||||
};
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> _compileDebug({ bool previewDart2: true }) async {
|
||||
static Future<Map<String, dynamic>> _compileDebug({ bool previewDart2 = true }) async {
|
||||
await flutter('clean');
|
||||
final Stopwatch watch = new Stopwatch();
|
||||
final List<String> options = <String>['--debug'];
|
||||
|
||||
Reference in New Issue
Block a user