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:
committed by
GitHub
parent
d1761f1072
commit
f0553ba58e
@@ -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)),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -663,7 +663,7 @@ void _parseAssetFromFile(
|
||||
baseDir: asset.baseDir,
|
||||
entryUri: entryUri,
|
||||
relativeUri: relativeUri,
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -185,7 +185,7 @@ class ResidentWebRunner extends ResidentRunner {
|
||||
mainPath: target,
|
||||
debuggingOptions: debuggingOptions,
|
||||
platformArgs: <String, Object>{
|
||||
'uri': _webFs.uri
|
||||
'uri': _webFs.uri,
|
||||
},
|
||||
);
|
||||
if (supportsServiceProtocol) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -149,7 +149,7 @@ class ReleaseCopyFlutterBundle extends CopyFlutterBundle {
|
||||
|
||||
@override
|
||||
List<Source> get inputs => const <Source>[
|
||||
Source.behavior(AssetOutputBehavior())
|
||||
Source.behavior(AssetOutputBehavior()),
|
||||
];
|
||||
|
||||
@override
|
||||
|
||||
@@ -849,7 +849,7 @@ class AndroidGenSnapshotArtifacts extends EngineCachedArtifact {
|
||||
else if (platform.isLinux)
|
||||
...<List<String>>[
|
||||
..._linuxBinaryDirs,
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -180,7 +180,7 @@ class TestCommand extends FastFlutterCommand {
|
||||
if (fs.isDirectorySync(path))
|
||||
..._findTests(fs.directory(path))
|
||||
else
|
||||
path
|
||||
path,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
@@ -416,7 +416,7 @@ Future<XcodeBuildResult> buildXcodeProject({
|
||||
'CODE_SIGNING_ALLOWED=NO',
|
||||
'CODE_SIGNING_REQUIRED=NO',
|
||||
'CODE_SIGNING_IDENTITY=""',
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user