Add missing trailing commas (#28673)
* add trailing commas on list/map/parameters * add trailing commas on Invocation with nb of arg>1 * add commas for widget containing widgets * add trailing commas if instantiation contains trailing comma * revert bad change
This commit is contained in:
committed by
GitHub
parent
046f960ae2
commit
387f885481
@@ -236,7 +236,7 @@ Future<EvalResult> _evalCommand(String executable, List<String> arguments, {
|
||||
}
|
||||
|
||||
Future<void> _runFlutterAnalyze(String workingDirectory, {
|
||||
List<String> options = const <String>[]
|
||||
List<String> options = const <String>[],
|
||||
}) {
|
||||
return runCommand(flutter, <String>['analyze', '--dartdocs']..addAll(options),
|
||||
workingDirectory: workingDirectory,
|
||||
|
||||
@@ -58,7 +58,7 @@ Future<void> runCommand(String executable, List<String> arguments, {
|
||||
if (printOutput) {
|
||||
await Future.wait<void>(<Future<void>>[
|
||||
stdout.addStream(process.stdout),
|
||||
stderr.addStream(process.stderr)
|
||||
stderr.addStream(process.stderr),
|
||||
]);
|
||||
} else {
|
||||
savedStdout = process.stdout.toList();
|
||||
|
||||
@@ -309,7 +309,7 @@ Future<void> _runCoverage() async {
|
||||
Future<void> _pubRunTest(
|
||||
String workingDirectory, {
|
||||
String testPath,
|
||||
bool enableFlutterToolAsserts = false
|
||||
bool enableFlutterToolAsserts = false,
|
||||
}) {
|
||||
final List<String> args = <String>['run', 'test', '-rcompact', '-j1'];
|
||||
if (!hasColor)
|
||||
|
||||
@@ -103,7 +103,7 @@ class FakeProcessManager extends Mock implements ProcessManager {
|
||||
when(runSync(
|
||||
any,
|
||||
environment: anyNamed('environment'),
|
||||
workingDirectory: anyNamed('workingDirectory')
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
)).thenAnswer(_nextResultSync);
|
||||
|
||||
when(runSync(any)).thenAnswer(_nextResultSync);
|
||||
|
||||
@@ -27,10 +27,10 @@ void main() {
|
||||
test('start works', () async {
|
||||
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
|
||||
'gsutil acl get gs://flutter_infra/releases/releases.json': <ProcessResult>[
|
||||
ProcessResult(0, 0, 'output1', '')
|
||||
ProcessResult(0, 0, 'output1', ''),
|
||||
],
|
||||
'gsutil cat gs://flutter_infra/releases/releases.json': <ProcessResult>[
|
||||
ProcessResult(0, 0, 'output2', '')
|
||||
ProcessResult(0, 0, 'output2', ''),
|
||||
],
|
||||
};
|
||||
processManager.fakeResults = calls;
|
||||
@@ -49,10 +49,10 @@ void main() {
|
||||
test('run works', () async {
|
||||
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
|
||||
'gsutil acl get gs://flutter_infra/releases/releases.json': <ProcessResult>[
|
||||
ProcessResult(0, 0, 'output1', '')
|
||||
ProcessResult(0, 0, 'output1', ''),
|
||||
],
|
||||
'gsutil cat gs://flutter_infra/releases/releases.json': <ProcessResult>[
|
||||
ProcessResult(0, 0, 'output2', '')
|
||||
ProcessResult(0, 0, 'output2', ''),
|
||||
],
|
||||
};
|
||||
processManager.fakeResults = calls;
|
||||
@@ -66,10 +66,10 @@ void main() {
|
||||
test('runSync works', () async {
|
||||
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
|
||||
'gsutil acl get gs://flutter_infra/releases/releases.json': <ProcessResult>[
|
||||
ProcessResult(0, 0, 'output1', '')
|
||||
ProcessResult(0, 0, 'output1', ''),
|
||||
],
|
||||
'gsutil cat gs://flutter_infra/releases/releases.json': <ProcessResult>[
|
||||
ProcessResult(0, 0, 'output2', '')
|
||||
ProcessResult(0, 0, 'output2', ''),
|
||||
],
|
||||
};
|
||||
processManager.fakeResults = calls;
|
||||
@@ -83,10 +83,10 @@ void main() {
|
||||
test('captures stdin', () async {
|
||||
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
|
||||
'gsutil acl get gs://flutter_infra/releases/releases.json': <ProcessResult>[
|
||||
ProcessResult(0, 0, 'output1', '')
|
||||
ProcessResult(0, 0, 'output1', ''),
|
||||
],
|
||||
'gsutil cat gs://flutter_infra/releases/releases.json': <ProcessResult>[
|
||||
ProcessResult(0, 0, 'output2', '')
|
||||
ProcessResult(0, 0, 'output2', ''),
|
||||
],
|
||||
};
|
||||
processManager.fakeResults = calls;
|
||||
|
||||
Reference in New Issue
Block a user