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:
Alexandre Ardhuin
2019-03-01 08:17:55 +01:00
committed by GitHub
parent 046f960ae2
commit 387f885481
626 changed files with 5183 additions and 5183 deletions

View File

@@ -40,7 +40,7 @@ Future<void> _patchXcconfigFilesIfNotPatched(String flutterProjectPath) async {
final List<File> xcconfigFiles = <File>[
_fs.file(path.join(flutterProjectPath, 'ios/Flutter/Flutter.xcconfig')),
_fs.file(path.join(flutterProjectPath, 'ios/Flutter/Debug.xcconfig')),
_fs.file(path.join(flutterProjectPath, 'ios/Flutter/Release.xcconfig'))
_fs.file(path.join(flutterProjectPath, 'ios/Flutter/Release.xcconfig')),
];
bool xcconfigFileExists = false;

View File

@@ -23,7 +23,7 @@ TaskFunction createHotModeTest() {
final File benchmarkFile = file(path.join(_editedFlutterGalleryDir.path, 'hot_benchmark.json'));
rm(benchmarkFile);
final List<String> options = <String>[
'--hot', '-d', device.deviceId, '--benchmark', '--verbose', '--resident'
'--hot', '-d', device.deviceId, '--benchmark', '--verbose', '--resident',
];
setLocalEngineOptionIfNecessary(options);
int hotReloadCount = 0;
@@ -40,7 +40,7 @@ TaskFunction createHotModeTest() {
final Process process = await startProcess(
path.join(flutterDirectory.path, 'bin', 'flutter'),
<String>['run']..addAll(options),
environment: null
environment: null,
);
final Completer<void> stdoutDone = Completer<void>();
@@ -53,11 +53,11 @@ TaskFunction createHotModeTest() {
if (hotReloadCount == 0) {
// Update the file and reload again.
final File appDartSource = file(path.join(
_editedFlutterGalleryDir.path, 'lib/gallery/app.dart'
_editedFlutterGalleryDir.path, 'lib/gallery/app.dart',
));
appDartSource.writeAsStringSync(
appDartSource.readAsStringSync().replaceFirst(
"'Flutter Gallery'", "'Updated Flutter Gallery'"
"'Flutter Gallery'", "'Updated Flutter Gallery'",
)
);
process.stdin.writeln('r');
@@ -94,7 +94,7 @@ TaskFunction createHotModeTest() {
final Process process = await startProcess(
path.join(flutterDirectory.path, 'bin', 'flutter'),
<String>['run']..addAll(options),
environment: null
environment: null,
);
final Completer<void> stdoutDone = Completer<void>();
final Completer<void> stderrDone = Completer<void>();
@@ -156,7 +156,7 @@ TaskFunction createHotModeTest() {
'hotReloadFlutterReassembleMillisecondsAfterChange',
'hotReloadVMReloadMillisecondsAfterChange',
'hotReloadInitialDevFSSyncAfterRelaunchMilliseconds',
]
],
);
};
}

View File

@@ -29,7 +29,7 @@ TaskFunction createFlavorsTest() {
return DriverTest(
'${flutterDirectory.path}/dev/integration_tests/flavors',
'lib/main.dart',
extraOptions: <String>['--flavor', 'paid']
extraOptions: <String>['--flavor', 'paid'],
);
}
@@ -66,7 +66,7 @@ TaskFunction createCodegenerationIntegrationTest() {
'${flutterDirectory.path}/dev/integration_tests/codegen',
'lib/main.dart',
environment: <String, String>{
'FLUTTER_EXPERIMENTAL_BUILD': 'true'
'FLUTTER_EXPERIMENTAL_BUILD': 'true',
},
);
}

View File

@@ -65,7 +65,7 @@ class FlutterProject {
await inDirectory(directory, () async {
await flutter(
'create',
options: <String>['--template=app', '--org', 'io.flutter.devicelab']..addAll(options)..add('plugintest')
options: <String>['--template=app', '--org', 'io.flutter.devicelab']..addAll(options)..add('plugintest'),
);
});
return FlutterProject(directory, 'plugintest');