enable lint prefer_equal_for_default_values (#18156)
This commit is contained in:
committed by
GitHub
parent
6be81ebf9b
commit
09276bea25
@@ -78,9 +78,9 @@ Branch fromBranchName(String name) {
|
||||
class ProcessRunner {
|
||||
ProcessRunner({
|
||||
ProcessManager processManager,
|
||||
this.subprocessOutput: true,
|
||||
this.subprocessOutput = true,
|
||||
this.defaultWorkingDirectory,
|
||||
this.platform: const LocalPlatform(),
|
||||
this.platform = const LocalPlatform(),
|
||||
}) : processManager = processManager ?? const LocalProcessManager() {
|
||||
environment = new Map<String, String>.from(platform.environment);
|
||||
}
|
||||
@@ -112,7 +112,7 @@ class ProcessRunner {
|
||||
Future<String> runProcess(
|
||||
List<String> commandLine, {
|
||||
Directory workingDirectory,
|
||||
bool failOk: false,
|
||||
bool failOk = false,
|
||||
}) async {
|
||||
workingDirectory ??= defaultWorkingDirectory ?? Directory.current;
|
||||
if (subprocessOutput) {
|
||||
@@ -193,8 +193,8 @@ class ArchiveCreator {
|
||||
this.revision,
|
||||
this.branch, {
|
||||
ProcessManager processManager,
|
||||
bool subprocessOutput: true,
|
||||
this.platform: const LocalPlatform(),
|
||||
bool subprocessOutput = true,
|
||||
this.platform = const LocalPlatform(),
|
||||
HttpReader httpReader,
|
||||
}) : assert(revision.length == 40),
|
||||
flutterRoot = new Directory(path.join(tempDir.path, 'flutter')),
|
||||
@@ -430,8 +430,8 @@ class ArchivePublisher {
|
||||
this.version,
|
||||
this.outputFile, {
|
||||
ProcessManager processManager,
|
||||
bool subprocessOutput: true,
|
||||
this.platform: const LocalPlatform(),
|
||||
bool subprocessOutput = true,
|
||||
this.platform = const LocalPlatform(),
|
||||
}) : assert(revision.length == 40),
|
||||
platformName = platform.operatingSystem.toLowerCase(),
|
||||
metadataGsPath = '$gsReleaseFolder/${getMetadataFilename(platform)}',
|
||||
@@ -528,7 +528,7 @@ class ArchivePublisher {
|
||||
Future<String> _runGsUtil(
|
||||
List<String> args, {
|
||||
Directory workingDirectory,
|
||||
bool failOk: false,
|
||||
bool failOk = false,
|
||||
}) async {
|
||||
return _processRunner.runProcess(
|
||||
<String>['gsutil']..addAll(args),
|
||||
|
||||
@@ -274,7 +274,7 @@ class EvalResult {
|
||||
Future<EvalResult> _evalCommand(String executable, List<String> arguments, {
|
||||
String workingDirectory,
|
||||
Map<String, String> environment,
|
||||
bool skip: false,
|
||||
bool skip = false,
|
||||
}) async {
|
||||
final String commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
|
||||
final String relativeWorkingDir = path.relative(workingDirectory);
|
||||
@@ -315,10 +315,10 @@ Future<EvalResult> _evalCommand(String executable, List<String> arguments, {
|
||||
Future<Null> _runCommand(String executable, List<String> arguments, {
|
||||
String workingDirectory,
|
||||
Map<String, String> environment,
|
||||
bool expectFailure: false,
|
||||
bool printOutput: true,
|
||||
bool skip: false,
|
||||
Duration timeout: _kLongTimeout,
|
||||
bool expectFailure = false,
|
||||
bool printOutput = true,
|
||||
bool skip = false,
|
||||
Duration timeout = _kLongTimeout,
|
||||
}) async {
|
||||
final String commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
|
||||
final String relativeWorkingDir = path.relative(workingDirectory);
|
||||
@@ -364,11 +364,11 @@ Future<Null> _runCommand(String executable, List<String> arguments, {
|
||||
|
||||
Future<Null> _runFlutterTest(String workingDirectory, {
|
||||
String script,
|
||||
bool expectFailure: false,
|
||||
bool printOutput: true,
|
||||
List<String> options: const <String>[],
|
||||
bool skip: false,
|
||||
Duration timeout: _kLongTimeout,
|
||||
bool expectFailure = false,
|
||||
bool printOutput = true,
|
||||
List<String> options = const <String>[],
|
||||
bool skip = false,
|
||||
Duration timeout = _kLongTimeout,
|
||||
}) {
|
||||
final List<String> args = <String>['test']..addAll(options);
|
||||
if (flutterTestArgs != null && flutterTestArgs.isNotEmpty)
|
||||
@@ -385,7 +385,7 @@ Future<Null> _runFlutterTest(String workingDirectory, {
|
||||
}
|
||||
|
||||
Future<Null> _runFlutterAnalyze(String workingDirectory, {
|
||||
List<String> options: const <String>[]
|
||||
List<String> options = const <String>[]
|
||||
}) {
|
||||
return _runCommand(flutter, <String>['analyze']..addAll(options),
|
||||
workingDirectory: workingDirectory,
|
||||
@@ -464,7 +464,7 @@ bool _matches<T>(List<T> a, List<T> b) {
|
||||
final RegExp _importPattern = new RegExp(r"import 'package:flutter/([^.]+)\.dart'");
|
||||
final RegExp _importMetaPattern = new RegExp(r"import 'package:meta/meta.dart'");
|
||||
|
||||
Set<String> _findDependencies(String srcPath, List<String> errors, { bool checkForMeta: false }) {
|
||||
Set<String> _findDependencies(String srcPath, List<String> errors, { bool checkForMeta = false }) {
|
||||
return new Directory(srcPath).listSync(recursive: true).where((FileSystemEntity entity) {
|
||||
return entity is File && path.extension(entity.path) == '.dart';
|
||||
}).map<Set<String>>((FileSystemEntity entity) {
|
||||
|
||||
Reference in New Issue
Block a user