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();
|
||||
|
||||
@@ -1379,8 +1379,8 @@ plugin2=${plugin2.path}
|
||||
when(mockProcessManager.run(
|
||||
any,
|
||||
environment: anyNamed('environment'),
|
||||
workingDirectory: anyNamed('workingDirectory'))
|
||||
).thenAnswer(
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
)).thenAnswer(
|
||||
(_) async => ProcessResult(1, 0, '', ''),
|
||||
);
|
||||
fs.directory('build/outputs/repo').createSync(recursive: true);
|
||||
|
||||
@@ -127,7 +127,7 @@ void main() {
|
||||
),
|
||||
Platform: () => FakePlatform.fromPlatform(const LocalPlatform())
|
||||
..environment = <String, String>{
|
||||
'FLUTTER_STORAGE_BASE_URL': 'example.invalid'
|
||||
'FLUTTER_STORAGE_BASE_URL': 'example.invalid',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ void main() {
|
||||
Source.pattern('{PROJECT_DIR}/foo.dart'),
|
||||
]
|
||||
..outputs = const <Source>[
|
||||
Source.pattern('{BUILD_DIR}/out')
|
||||
Source.pattern('{BUILD_DIR}/out'),
|
||||
];
|
||||
final BuildResult result = await buildSystem.build(badTarget, environment);
|
||||
|
||||
@@ -293,7 +293,7 @@ void main() {
|
||||
environment.buildDir.createSync(recursive: true);
|
||||
expect(fooTarget.toJson(environment), <String, dynamic>{
|
||||
'inputs': <Object>[
|
||||
'/foo.dart'
|
||||
'/foo.dart',
|
||||
],
|
||||
'outputs': <Object>[
|
||||
fs.path.join(environment.buildDir.path, 'out'),
|
||||
|
||||
@@ -223,7 +223,7 @@ void main() {
|
||||
createMockProcess(
|
||||
exitCode: 1,
|
||||
stdout: r8StdoutWarning,
|
||||
)
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ void main() {
|
||||
createMockProcess(
|
||||
exitCode: 1,
|
||||
stdout: r8StdoutWarning,
|
||||
)
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ void main() {
|
||||
'--windows',
|
||||
'--fuchsia',
|
||||
'--flutter_runner',
|
||||
]
|
||||
],
|
||||
);
|
||||
expect(artifacts, unorderedEquals(<DevelopmentArtifact>{
|
||||
DevelopmentArtifact.universal,
|
||||
@@ -67,7 +67,7 @@ void main() {
|
||||
'precache',
|
||||
'--no-ios',
|
||||
'--android',
|
||||
]
|
||||
],
|
||||
);
|
||||
expect(artifacts, unorderedEquals(<DevelopmentArtifact>{
|
||||
DevelopmentArtifact.universal,
|
||||
@@ -92,7 +92,7 @@ void main() {
|
||||
'--android_gen_snapshot',
|
||||
'--android_maven',
|
||||
'--android_internal_build',
|
||||
]
|
||||
],
|
||||
);
|
||||
expect(artifacts, unorderedEquals(<DevelopmentArtifact>{
|
||||
DevelopmentArtifact.universal,
|
||||
@@ -125,7 +125,7 @@ void main() {
|
||||
'--windows',
|
||||
'--fuchsia',
|
||||
'--flutter_runner',
|
||||
]
|
||||
],
|
||||
);
|
||||
expect(artifacts, unorderedEquals(<DevelopmentArtifact>{
|
||||
DevelopmentArtifact.universal,
|
||||
|
||||
@@ -167,7 +167,7 @@ void main() {
|
||||
expect(outputExpression.errorCount, 0);
|
||||
lastExpressionCompleted.complete(true);
|
||||
},
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
compileResponseCompleter.complete(Future<List<int>>.value(utf8.encode(
|
||||
|
||||
@@ -415,4 +415,4 @@ class MyHttpOverrides extends HttpOverrides {
|
||||
class MockOddlyFailingHttpClient extends Mock implements HttpClient {}
|
||||
class MockHttpClientRequest extends Mock implements HttpClientRequest {}
|
||||
class MockHttpHeaders extends Mock implements HttpHeaders {}
|
||||
class MockHttpClientResponse extends Mock implements HttpClientResponse {}
|
||||
class MockHttpClientResponse extends Mock implements HttpClientResponse {}
|
||||
|
||||
@@ -27,7 +27,7 @@ void main() {
|
||||
FeatureFlags: () => TestFeatureFlags(
|
||||
isLinuxEnabled: true,
|
||||
isWindowsEnabled: true,
|
||||
)
|
||||
),
|
||||
}));
|
||||
|
||||
test('doctor validators does not include desktop when features are enabled', () => testbed.run(() {
|
||||
@@ -39,7 +39,7 @@ void main() {
|
||||
FeatureFlags: () => TestFeatureFlags(
|
||||
isLinuxEnabled: false,
|
||||
isWindowsEnabled: false,
|
||||
)
|
||||
),
|
||||
}));
|
||||
|
||||
test('doctor validators includes web when feature is enabled', () => testbed.run(() {
|
||||
@@ -48,7 +48,7 @@ void main() {
|
||||
}, overrides: <Type, Generator>{
|
||||
FeatureFlags: () => TestFeatureFlags(
|
||||
isWebEnabled: true,
|
||||
)
|
||||
),
|
||||
}));
|
||||
|
||||
test('doctor validators does not include web when feature is disabled', () => testbed.run(() {
|
||||
@@ -57,6 +57,6 @@ void main() {
|
||||
}, overrides: <Type, Generator>{
|
||||
FeatureFlags: () => TestFeatureFlags(
|
||||
isWebEnabled: false,
|
||||
)
|
||||
),
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -127,14 +127,14 @@ void main() {
|
||||
mockArtifacts.getArtifactPath(
|
||||
Artifact.ideviceinstaller,
|
||||
platform: anyNamed('platform'),
|
||||
)
|
||||
),
|
||||
).thenReturn(installerPath);
|
||||
|
||||
when(
|
||||
mockArtifacts.getArtifactPath(
|
||||
Artifact.iosDeploy,
|
||||
platform: anyNamed('platform'),
|
||||
)
|
||||
),
|
||||
).thenReturn(iosDeployPath);
|
||||
|
||||
when(mockPortForwarder.forward(devicePort, hostPort: anyNamed('hostPort')))
|
||||
@@ -411,7 +411,7 @@ void main() {
|
||||
mockArtifacts.getArtifactPath(
|
||||
Artifact.ideviceinstaller,
|
||||
platform: anyNamed('platform'),
|
||||
)
|
||||
),
|
||||
).thenReturn(installerPath);
|
||||
});
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ void main() {
|
||||
overrides: <Type, Generator>{
|
||||
Platform: () => linux,
|
||||
FeatureFlags: () => TestFeatureFlags(isLinuxEnabled: true),
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ void main() {
|
||||
});
|
||||
when(mockFlutterDevice.devFS).thenReturn(mockDevFS);
|
||||
when(mockFlutterDevice.views).thenReturn(<FlutterView>[
|
||||
mockFlutterView
|
||||
mockFlutterView,
|
||||
]);
|
||||
when(mockFlutterDevice.device).thenReturn(mockDevice);
|
||||
when(mockFlutterView.uiIsolate).thenReturn(mockIsolate);
|
||||
|
||||
@@ -155,7 +155,7 @@ void main() {
|
||||
'type': 'Event',
|
||||
'kind': 'WriteEvent',
|
||||
'timestamp': 1569473488296,
|
||||
'bytes': base64.encode('THIS MESSAGE IS IMPORTANT'.codeUnits)
|
||||
'bytes': base64.encode('THIS MESSAGE IS IMPORTANT'.codeUnits),
|
||||
}));
|
||||
});
|
||||
unawaited(residentWebRunner.run(
|
||||
|
||||
@@ -33,7 +33,7 @@ void main() {
|
||||
|
||||
expect(response.headers, <String, String>{
|
||||
'Content-Type': 'text/html',
|
||||
'content-length': '5'
|
||||
'content-length': '5',
|
||||
});
|
||||
expect(await response.readAsString(), 'hello');
|
||||
}));
|
||||
|
||||
@@ -37,7 +37,7 @@ void main() {
|
||||
return 1234;
|
||||
});
|
||||
when(platform.environment).thenReturn(<String, String>{
|
||||
kChromeEnvironment: 'example_chrome'
|
||||
kChromeEnvironment: 'example_chrome',
|
||||
});
|
||||
final Directory mockDirectory = MockDirectory();
|
||||
when(fs.systemTempDirectory).thenReturn(mockDirectory);
|
||||
@@ -61,7 +61,7 @@ void main() {
|
||||
exitCode: Completer<int>().future,
|
||||
stdout: const Stream<List<int>>.empty(),
|
||||
stderr: Stream<List<int>>.fromIterable(<List<int>>[
|
||||
utf8.encode('\n\nDevTools listening\n\n')
|
||||
utf8.encode('\n\nDevTools listening\n\n'),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -57,8 +57,8 @@ void main() {
|
||||
DefaultBuildResult((DefaultBuildResultBuilder builder) {
|
||||
builder.target = 'web';
|
||||
builder.status = BuildStatus.succeeded;
|
||||
})
|
||||
]
|
||||
}),
|
||||
],
|
||||
);
|
||||
})
|
||||
));
|
||||
@@ -163,8 +163,8 @@ void main() {
|
||||
DefaultBuildResult((DefaultBuildResultBuilder builder) {
|
||||
builder.target = 'web';
|
||||
builder.status = BuildStatus.failed;
|
||||
})
|
||||
]
|
||||
}),
|
||||
],
|
||||
);
|
||||
})
|
||||
));
|
||||
|
||||
@@ -50,7 +50,7 @@ void main() {
|
||||
when(mockProcessManager.canRun(kMacOSExecutable)).thenReturn(false);
|
||||
final ValidationResult result = await webValidator.validate();
|
||||
expect(result.messages, <ValidationMessage>[
|
||||
ValidationMessage.hint('CHROME_EXECUTABLE not set')
|
||||
ValidationMessage.hint('CHROME_EXECUTABLE not set'),
|
||||
]);
|
||||
expect(result.type, ValidationType.missing);
|
||||
}));
|
||||
|
||||
@@ -128,7 +128,7 @@ void main() {
|
||||
userMessages.visualStudioMissing(
|
||||
visualStudio.workloadDescription,
|
||||
visualStudio.necessaryComponentDescriptions(validator.majorVersion),
|
||||
)
|
||||
),
|
||||
);
|
||||
expect(result.messages.contains(expectedMessage), true);
|
||||
expect(result.type, ValidationType.missing);
|
||||
|
||||
@@ -26,7 +26,7 @@ void main() {
|
||||
overrides: <Type, Generator>{
|
||||
Platform: () => windows,
|
||||
FeatureFlags: () => TestFeatureFlags(isWindowsEnabled: true),
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user