remove unnecessary string interpolations (#49622)

This commit is contained in:
Alexandre Ardhuin
2020-01-31 18:30:21 +01:00
committed by GitHub
parent 275ec45ec4
commit b5f328e37e
55 changed files with 78 additions and 76 deletions

View File

@@ -68,7 +68,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
}
final String presetPluginsPath = pathsSelectorValue == null
? null
: globals.fs.path.join(homeDirPath, 'Library', 'Application Support', '$pathsSelectorValue');
: globals.fs.path.join(homeDirPath, 'Library', 'Application Support', pathsSelectorValue);
return AndroidStudio(studioPath, version: version, presetPluginsPath: presetPluginsPath);
}

View File

@@ -451,7 +451,7 @@ class DebugAssetServer extends AssetServer {
flutterProject.dartTool.path,
'build',
'flutter_web',
'${flutterProject.manifest.appName}',
flutterProject.manifest.appName,
'lib',
'${targetBaseName}_web_entrypoint.dart.js.tar.gz',
));

View File

@@ -580,7 +580,7 @@ abstract class CachedArtifact extends ArtifactSet {
/// Download an archive from the given [url] and unzip it to [location].
Future<void> _downloadArchive(String message, Uri url, Directory location, bool verifier(File f), void extractor(File f, Directory d)) {
return _withDownloadFile('${flattenNameSubdirs(url)}', (File tempFile) async {
return _withDownloadFile(flattenNameSubdirs(url), (File tempFile) async {
if (!verifier(tempFile)) {
final Status status = globals.logger.startProgress(message, timeout: timeoutConfiguration.slowOperation);
try {

View File

@@ -382,7 +382,7 @@ class UpdatePackagesCommand extends FlutterCommand {
for (_DependencyLink path in paths) {
final StringBuffer buf = StringBuffer();
while (path != null) {
buf.write('${path.to}');
buf.write(path.to);
path = path.from;
if (path != null) {
buf.write(' <- ');

View File

@@ -605,8 +605,9 @@ class DefaultResidentCompiler implements ResidentCompiler {
_server.stdin.writeln('recompile $mainUri$inputKey');
globals.printTrace('<- recompile $mainUri$inputKey');
for (final Uri fileUri in request.invalidatedFiles) {
_server.stdin.writeln(_mapFileUri(fileUri.toString(), packageUriMapper));
globals.printTrace('${_mapFileUri(fileUri.toString(), packageUriMapper)}');
final String message = _mapFileUri(fileUri.toString(), packageUriMapper);
_server.stdin.writeln(message);
globals.printTrace(message);
}
_server.stdin.writeln(inputKey);
globals.printTrace('<- $inputKey');

View File

@@ -468,7 +468,7 @@ abstract class Device {
table.add(<String>[
device.name,
device.id,
'${getNameForTargetPlatform(targetPlatform)}',
getNameForTargetPlatform(targetPlatform),
'${await device.sdkNameAndVersion}$supportIndicator',
]);
}

View File

@@ -50,7 +50,7 @@ class IOSDeploy {
'--justlaunch',
if (launchArguments.isNotEmpty) ...<String>[
'--args',
'${launchArguments.join(" ")}',
launchArguments.join(' '),
],
];

View File

@@ -469,7 +469,7 @@ Future<XcodeBuildResult> buildXcodeProject({
initialBuildStatus = null;
globals.printStatus(
'Xcode build done.'.padRight(kDefaultStatusPadding + 1)
+ '${getElapsedAsSeconds(sw.elapsed).padLeft(5)}',
+ getElapsedAsSeconds(sw.elapsed).padLeft(5),
);
flutterUsage.sendTiming('build', 'xcode-ios', Duration(milliseconds: sw.elapsedMilliseconds));

View File

@@ -79,7 +79,7 @@ Future<void> buildMacOS({
'xcrun',
'xcodebuild',
'-workspace', flutterProject.macos.xcodeWorkspace.path,
'-configuration', '$configuration',
'-configuration', configuration,
'-scheme', 'Runner',
'-derivedDataPath', flutterBuildDir.absolute.path,
'OBJROOT=${globals.fs.path.join(flutterBuildDir.absolute.path, 'Build', 'Intermediates.noindex')}',

View File

@@ -139,9 +139,9 @@ class BuildEvent extends UsageEvent {
// category
'build',
// parameter
FlutterCommand.current == null ?
'unspecified' :
'${FlutterCommand.current.name}',
FlutterCommand.current == null
? 'unspecified'
: FlutterCommand.current.name,
label: label,
);

View File

@@ -186,6 +186,6 @@ class TestCompiler {
_suppressOutput = true;
return;
}
globals.printError('$message');
globals.printError(message);
}
}

View File

@@ -115,7 +115,7 @@ void main() {
});
await const DebugUnpackMacOS().build(environment);
expect(globals.fs.directory('$_kOutputPrefix').existsSync(), true);
expect(globals.fs.directory(_kOutputPrefix).existsSync(), true);
for (final File file in inputs) {
expect(globals.fs.file(file.path.replaceFirst(_kInputPrefix, _kOutputPrefix)).existsSync(), true);
}

View File

@@ -107,7 +107,7 @@ void main() {
await runner.run(<String>['dummy', '--local-engine=ios_debug']);
// Verify that this also works if the sky_engine path is a symlink to the engine root.
fs.link('/symlink').createSync('$_kArbitraryEngineRoot');
fs.link('/symlink').createSync(_kArbitraryEngineRoot);
fs.file(_kDotPackages).writeAsStringSync('sky_engine:file:///symlink/src/out/ios_debug/gen/dart-pkg/sky_engine/lib/');
await runner.run(<String>['dummy', '--local-engine=ios_debug']);
}, overrides: <Type, Generator>{