Missing trailing commas (#41473)

* add missing trailing commas

* add more missing trailing commas

* add more and more missing trailing commas
This commit is contained in:
Alexandre Ardhuin
2019-09-30 18:48:23 +02:00
committed by GitHub
parent d1761f1072
commit f0553ba58e
166 changed files with 613 additions and 610 deletions

View File

@@ -22,7 +22,7 @@ class AndroidStudioValidator extends DoctorValidator {
if (studios.isEmpty)
NoAndroidStudioValidator()
else
...studios.map<DoctorValidator>((AndroidStudio studio) => AndroidStudioValidator(studio))
...studios.map<DoctorValidator>((AndroidStudio studio) => AndroidStudioValidator(studio)),
];
}

View File

@@ -663,7 +663,7 @@ void _parseAssetFromFile(
baseDir: asset.baseDir,
entryUri: entryUri,
relativeUri: relativeUri,
)
),
);
}

View File

@@ -107,7 +107,7 @@ final List<core.BuilderApplication> builders = <core.BuilderApplication>[
hasPlugins: hasPlugins,
initializePlatform: initializePlatform,
);
}
},
],
core.toRoot(),
hideOutput: true,
@@ -263,7 +263,7 @@ class FlutterWebTestBootstrapBuilder implements Builder {
Map<String, List<String>> get buildExtensions => const <String, List<String>>{
'_test.dart': <String>[
'_test.dart.browser_test.dart',
]
],
};
@override

View File

@@ -185,7 +185,7 @@ class ResidentWebRunner extends ResidentRunner {
mainPath: target,
debuggingOptions: debuggingOptions,
platformArgs: <String, Object>{
'uri': _webFs.uri
'uri': _webFs.uri,
},
);
if (supportsServiceProtocol) {

View File

@@ -128,7 +128,7 @@ abstract class Target {
inputs,
outputs,
<Node>[
for (Target target in dependencies) target._toNode(environment)
for (Target target in dependencies) target._toNode(environment),
],
environment,
);
@@ -680,7 +680,7 @@ class Node {
FileHashStore fileHashStore,
) async {
final Set<String> currentOutputPaths = <String>{
for (File file in outputs) file.path
for (File file in outputs) file.path,
};
// For each input, first determine if we've already computed the hash
// for it. Then collect it to be sent off for hashing as a group.

View File

@@ -22,8 +22,7 @@ class FileStorage {
final int version = json['version'];
final List<Object> rawCachedFiles = json['files'];
final List<FileHash> cachedFiles = <FileHash>[
for (Map<String, Object> rawFile in rawCachedFiles)
FileHash.fromJson(rawFile)
for (Map<String, Object> rawFile in rawCachedFiles) FileHash.fromJson(rawFile),
];
return FileStorage(version, cachedFiles);
}
@@ -35,8 +34,7 @@ class FileStorage {
final Map<String, Object> json = <String, Object>{
'version': version,
'files': <Object>[
for (FileHash file in files)
file.toJson()
for (FileHash file in files) file.toJson(),
],
};
return utf8.encode(jsonEncode(json));

View File

@@ -136,7 +136,7 @@ class SourceVisitor {
sources.addAll(<File>[
for (FileSystemEntity entity in fs.directory(path).listSync(recursive: true))
if (entity is File)
entity
entity,
]);
} else {
sources.add(fs.file(path));

View File

@@ -161,7 +161,7 @@ class FlutterPlugins extends Target {
@override
List<Source> get outputs => const <Source>[
Source.pattern('{PROJECT_DIR}/.flutter-plugins')
Source.pattern('{PROJECT_DIR}/.flutter-plugins'),
];
@override

View File

@@ -149,7 +149,7 @@ class ReleaseCopyFlutterBundle extends CopyFlutterBundle {
@override
List<Source> get inputs => const <Source>[
Source.behavior(AssetOutputBehavior())
Source.behavior(AssetOutputBehavior()),
];
@override

View File

@@ -849,7 +849,7 @@ class AndroidGenSnapshotArtifacts extends EngineCachedArtifact {
else if (platform.isLinux)
...<List<String>>[
..._linuxBinaryDirs,
]
],
];
}

View File

@@ -21,9 +21,13 @@ class BuildBundleCommand extends BuildSubCommand {
usesBuildNumberOption();
addBuildModeFlags(verboseHelp: verboseHelp);
argParser
..addFlag('precompiled', negatable: false, help: 'If not provided, then '
'a debug build is always provided, regardless of build mode. If provided '
'then release is the default mode.'
..addFlag(
'precompiled',
negatable: false,
help:
'If not provided, then '
'a debug build is always provided, regardless of build mode. If provided '
'then release is the default mode.',
)
// This option is still referenced by the iOS build scripts. We should
// remove it once we've updated those build scripts.

View File

@@ -180,7 +180,7 @@ class TestCommand extends FastFlutterCommand {
if (fs.isDirectorySync(path))
..._findTests(fs.directory(path))
else
path
path,
];
}

View File

@@ -1150,7 +1150,7 @@ String _generateFakePubspec(Iterable<PubspecDependency> dependencies) {
printStatus('WARNING: the following packages use hard-coded version constraints:');
final Set<String> allTransitive = <String>{
for (PubspecDependency dependency in dependencies)
dependency.name
dependency.name,
};
for (String package in _kManuallyPinnedDependencies.keys) {
// Don't add pinned dependency if it is not in the set of all transitive dependencies.

View File

@@ -179,7 +179,7 @@ class DeviceManager {
for (Device device in devices)
if (await device.targetPlatform != TargetPlatform.fuchsia &&
await device.targetPlatform != TargetPlatform.web_javascript)
device
device,
];
}
@@ -190,7 +190,7 @@ class DeviceManager {
devices = <Device>[
for (Device device in devices)
if (isDeviceSupportedForProject(device, flutterProject))
device
device,
];
} else if (devices.length == 1 &&
!hasSpecifiedDeviceId &&

View File

@@ -416,7 +416,7 @@ Future<XcodeBuildResult> buildXcodeProject({
'CODE_SIGNING_ALLOWED=NO',
'CODE_SIGNING_REQUIRED=NO',
'CODE_SIGNING_IDENTITY=""',
]
],
);
}

View File

@@ -87,7 +87,7 @@ class LinuxDevice extends Device {
);
}
final Process process = await processManager.start(<String>[
package.executable(debuggingOptions?.buildInfo?.mode)
package.executable(debuggingOptions?.buildInfo?.mode),
]);
if (debuggingOptions?.buildInfo?.isRelease == true) {
return LaunchResult.succeeded();

View File

@@ -97,7 +97,7 @@ class MacOSDevice extends Device {
_lastBuiltMode = debuggingOptions?.buildInfo?.mode;
final Process process = await processManager.start(<String>[
executable
executable,
]);
if (debuggingOptions?.buildInfo?.isRelease == true) {
return LaunchResult.succeeded();

View File

@@ -150,7 +150,7 @@ class Plugin {
final int numKeys = yaml.keys.toSet().length;
if (numKeys != 1) {
return <String>[
'Invalid plugin specification. There must be only one key: "platforms", found multiple: ${yaml.keys.join(',')}'
'Invalid plugin specification. There must be only one key: "platforms", found multiple: ${yaml.keys.join(',')}',
];
} else {
return _validateMultiPlatformYaml(yaml['platforms']);

View File

@@ -176,7 +176,7 @@ class HotRunner extends ResidentRunner {
httpUri: flutterDevices.first.observatoryUris.first,
wsUri: flutterDevices.first.vmServices.first.wsAddress,
baseUri: baseUris.first.toString(),
)
),
);
}
} catch (error) {

View File

@@ -54,7 +54,7 @@ class VisualStudioValidator extends DoctorValidator {
userMessages.visualStudioMissingComponents(
visualStudio.workloadDescription,
visualStudio.necessaryComponentDescriptions(majorVersion),
)
),
));
}
versionInfo = '${visualStudio.displayName} ${visualStudio.displayVersion}';
@@ -64,7 +64,7 @@ class VisualStudioValidator extends DoctorValidator {
userMessages.visualStudioMissing(
visualStudio.workloadDescription,
visualStudio.necessaryComponentDescriptions(majorVersion),
)
),
));
}

View File

@@ -88,7 +88,7 @@ class WindowsDevice extends Device {
);
}
final Process process = await processUtils.start(<String>[
package.executable(debuggingOptions?.buildInfo?.mode)
package.executable(debuggingOptions?.buildInfo?.mode),
]);
if (debuggingOptions?.buildInfo?.isRelease == true) {
return LaunchResult.succeeded();