change quote to avoid escapes (#50368)
This commit is contained in:
committed by
GitHub
parent
fd1062debd
commit
f15c887c63
@@ -11,7 +11,7 @@ const int _kNumWarmUp = 100;
|
||||
|
||||
void main() {
|
||||
final List<String> words = 'Lorem Ipsum is simply dummy text of the printing and'
|
||||
' typesetting industry. Lorem Ipsum has been the industry\'s'
|
||||
" typesetting industry. Lorem Ipsum has been the industry's"
|
||||
' standard dummy text ever since the 1500s, when an unknown'
|
||||
' printer took a galley of type and scrambled it to make a'
|
||||
' type specimen book'.split(' ');
|
||||
|
||||
@@ -330,7 +330,7 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
||||
assert(count > 0);
|
||||
if (count == 1)
|
||||
return null;
|
||||
return ' $name: uses \'package:test\' $count times.';
|
||||
return " $name: uses 'package:test' $count times.";
|
||||
}
|
||||
if (name.startsWith('packages/flutter_test/')) {
|
||||
// flutter_test has deep ties to package:test
|
||||
@@ -341,7 +341,7 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
||||
if (count == 1)
|
||||
return null;
|
||||
}
|
||||
return ' $name: uses \'package:test\' directly';
|
||||
return " $name: uses 'package:test' directly";
|
||||
}
|
||||
return null;
|
||||
})
|
||||
@@ -354,11 +354,11 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
||||
final String s1 = errors.length == 1 ? 's' : '';
|
||||
final String s2 = errors.length == 1 ? '' : 's';
|
||||
exitWithError(<String>[
|
||||
'${bold}The following file$s2 use$s1 \'package:test\' incorrectly:$reset',
|
||||
"${bold}The following file$s2 use$s1 'package:test' incorrectly:$reset",
|
||||
...errors,
|
||||
'Rather than depending on \'package:test\' directly, use one of the shims:',
|
||||
"Rather than depending on 'package:test' directly, use one of the shims:",
|
||||
...shims,
|
||||
'This insulates us from breaking changes in \'package:test\'.'
|
||||
"This insulates us from breaking changes in 'package:test'."
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ Future<bool> run(List<String> arguments) async {
|
||||
if (parsedArguments.rest.isEmpty) {
|
||||
print('Error: No file arguments specified.');
|
||||
} else if (files.isEmpty) {
|
||||
print('Error: File arguments ("${parsedArguments.rest.join("\", \"")}") did not identify any real files.');
|
||||
print('Error: File arguments ("${parsedArguments.rest.join('", "')}") did not identify any real files.');
|
||||
}
|
||||
}
|
||||
return help;
|
||||
|
||||
@@ -157,7 +157,7 @@ final ArgParser _argParser = ArgParser()
|
||||
..addFlag(
|
||||
'list',
|
||||
abbr: 'l',
|
||||
help: 'Don\'t actually run the tasks, but list out the tasks that would\n'
|
||||
help: "Don't actually run the tasks, but list out the tasks that would\n"
|
||||
'have been run, in the order they would have run.',
|
||||
)
|
||||
..addOption(
|
||||
|
||||
@@ -53,7 +53,7 @@ Future<void> main() async {
|
||||
);
|
||||
});
|
||||
|
||||
const String newFileContent = 'include \':app\'';
|
||||
const String newFileContent = "include ':app'";
|
||||
|
||||
final File settingsGradle = File(path.join(projectDir.path, 'android', 'settings.gradle'));
|
||||
final File newSettingsGradle = File(path.join(projectDir.path, 'android', 'settings_aar.gradle'));
|
||||
|
||||
@@ -37,7 +37,7 @@ Future<void> main() async {
|
||||
);
|
||||
});
|
||||
|
||||
section('Delete plugin\'s Android folder');
|
||||
section("Delete plugin's Android folder");
|
||||
|
||||
final File androidFolder = File(path.join(
|
||||
projectDir.path,
|
||||
|
||||
@@ -127,7 +127,7 @@ Future<void> main() async {
|
||||
|
||||
final String sharedLibrary = path.join(androidArmSnapshotPath, 'app.so');
|
||||
if (!File(sharedLibrary).existsSync()) {
|
||||
throw TaskResult.failure('Shared library doesn\'t exist');
|
||||
throw TaskResult.failure("Shared library doesn't exist");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -212,7 +212,7 @@ Future<void> main() async {
|
||||
android:name="flutterProjectType"
|
||||
android:value="module" />''')
|
||||
) {
|
||||
return TaskResult.failure('Debug host APK doesn\'t contain metadata: flutterProjectType = module ');
|
||||
return TaskResult.failure("Debug host APK doesn't contain metadata: flutterProjectType = module ");
|
||||
}
|
||||
|
||||
final String analyticsOutput = analyticsOutputFile.readAsStringSync();
|
||||
@@ -270,7 +270,7 @@ Future<void> main() async {
|
||||
android:name="flutterProjectType"
|
||||
android:value="module" />''')
|
||||
) {
|
||||
return TaskResult.failure('Release host APK doesn\'t contain metadata: flutterProjectType = module ');
|
||||
return TaskResult.failure("Release host APK doesn't contain metadata: flutterProjectType = module ");
|
||||
}
|
||||
return TaskResult.success(null);
|
||||
} on TaskResult catch (taskResult) {
|
||||
|
||||
@@ -170,7 +170,7 @@ public class DummyPluginAClass {
|
||||
File(path.join(exampleApp.path, '.flutter-plugins-dependencies'));
|
||||
|
||||
if (!flutterPluginsDependenciesFile.existsSync()) {
|
||||
return TaskResult.failure('${flutterPluginsDependenciesFile.path} doesn\'t exist');
|
||||
return TaskResult.failure("${flutterPluginsDependenciesFile.path} doesn't exist");
|
||||
}
|
||||
|
||||
final String flutterPluginsDependenciesFileContent = flutterPluginsDependenciesFile.readAsStringSync();
|
||||
|
||||
@@ -78,8 +78,8 @@ void main() {
|
||||
|
||||
_findNextMatcherInList(
|
||||
stdout,
|
||||
(String line) => line.startsWith('Running Gradle task \'assembleRelease\'...'),
|
||||
'Running Gradle task \'assembleRelease\'...',
|
||||
(String line) => line.startsWith("Running Gradle task 'assembleRelease'..."),
|
||||
"Running Gradle task 'assembleRelease'...",
|
||||
);
|
||||
|
||||
_findNextMatcherInList(
|
||||
|
||||
@@ -225,7 +225,7 @@ class FuchsiaDeviceDiscovery implements DeviceDiscovery {
|
||||
String get _devFinder {
|
||||
final String devFinder = path.join(getArtifactPath(), 'fuchsia', 'tools', 'device-finder');
|
||||
if (!File(devFinder).existsSync()) {
|
||||
throw FileSystemException('Couldn\'t find device-finder at location $devFinder');
|
||||
throw FileSystemException("Couldn't find device-finder at location $devFinder");
|
||||
}
|
||||
return devFinder;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ Future<void> checkApkContainsClasses(File apk, List<String> classes) async {
|
||||
final ApkExtractor extractor = ApkExtractor(apk);
|
||||
for (final String className in classes) {
|
||||
if (!(await extractor.containsClass(className))) {
|
||||
throw Exception('APK doesn\'t contain class `$className`.');
|
||||
throw Exception("APK doesn't contain class `$className`.");
|
||||
}
|
||||
}
|
||||
extractor.dispose();
|
||||
|
||||
@@ -102,7 +102,7 @@ void main(List<String> argList) {
|
||||
_kShowDartPad,
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'Indicates whether DartPad should be included in the sample\'s '
|
||||
help: "Indicates whether DartPad should be included in the sample's "
|
||||
'final HTML output. This flag only applies when the type parameter is '
|
||||
'"sample".',
|
||||
);
|
||||
|
||||
@@ -73,7 +73,7 @@ Future<void> main(List<String> arguments) async {
|
||||
|
||||
final StringBuffer contents = StringBuffer('library temp_doc;\n\n');
|
||||
for (final String libraryRef in libraryRefs()) {
|
||||
contents.writeln('import \'package:$libraryRef\';');
|
||||
contents.writeln("import 'package:$libraryRef';");
|
||||
}
|
||||
File('$kDocsRoot/lib/temp_doc.dart').writeAsStringSync(contents.toString());
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ void main(List<String> args) {
|
||||
kJustPrint,
|
||||
negatable: false,
|
||||
help:
|
||||
'Don\'t actually roll the dev channel; '
|
||||
"Don't actually roll the dev channel; "
|
||||
'just print the would-be version and quit.',
|
||||
);
|
||||
argParser.addFlag(kYes, negatable: false, abbr: 'y', help: 'Skip the confirmation prompt.');
|
||||
|
||||
@@ -53,7 +53,7 @@ Future<void> main(List<String> arguments) async {
|
||||
'By default, the tool will generate the supported locales list in '
|
||||
'alphabetical order. Use this flag if you would like to default to '
|
||||
'a different locale. \n\n'
|
||||
'For example, pass in [\'en_US\'] if you would like your app to '
|
||||
"For example, pass in ['en_US'] if you would like your app to "
|
||||
'default to American English if a device supports it.',
|
||||
);
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ const Set<String> numberFormatsWithNamedParameters = <String>{
|
||||
};
|
||||
|
||||
List<String> generateIntlMethodArgs(Message message) {
|
||||
final List<String> methodArgs = <String>['name: \'${message.resourceId}\''];
|
||||
final List<String> methodArgs = <String>["name: '${message.resourceId}'"];
|
||||
if (message.description != null)
|
||||
methodArgs.add('desc: ${generateString(message.description)}');
|
||||
if (message.placeholders.isNotEmpty) {
|
||||
@@ -159,7 +159,7 @@ String generateDateFormattingLogic(Message message) {
|
||||
'the "${placeholder.type}" type. To properly resolve for the right '
|
||||
'${placeholder.type} format, the "format" attribute needs to be set '
|
||||
'to determine which DateFormat to use. \n'
|
||||
'Check the intl library\'s DateFormat class constructors for allowed '
|
||||
"Check the intl library's DateFormat class constructors for allowed "
|
||||
'date formats.'
|
||||
);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ String generateDateFormattingLogic(Message message) {
|
||||
throw L10nException(
|
||||
'Date format "${placeholder.format}" for placeholder '
|
||||
'${placeholder.name} does not have a corresponding DateFormat '
|
||||
'constructor\n. Check the intl library\'s DateFormat class '
|
||||
"constructor\n. Check the intl library's DateFormat class "
|
||||
'constructors for allowed date formats.'
|
||||
);
|
||||
}
|
||||
@@ -192,7 +192,7 @@ String generateNumberFormattingLogic(Message message) {
|
||||
throw L10nException(
|
||||
'Number format ${placeholder.format} for the ${placeholder.name} '
|
||||
'placeholder does not have a corresponding NumberFormat constructor.\n'
|
||||
'Check the intl library\'s NumberFormat class constructors for allowed '
|
||||
"Check the intl library's NumberFormat class constructors for allowed "
|
||||
'number formats.'
|
||||
);
|
||||
}
|
||||
@@ -584,14 +584,14 @@ class LocalizationsGenerator {
|
||||
arbPathStrings.sort();
|
||||
localeInfoList.sort();
|
||||
supportedLanguageCodes.addAll(localeInfoList.map((LocaleInfo localeInfo) {
|
||||
return '\'${localeInfo.languageCode}\'';
|
||||
return "'${localeInfo.languageCode}'";
|
||||
}));
|
||||
|
||||
if (preferredSupportedLocales != null) {
|
||||
for (final LocaleInfo preferredLocale in preferredSupportedLocales) {
|
||||
if (!localeInfoList.contains(preferredLocale)) {
|
||||
throw L10nException(
|
||||
'The preferred supported locale, \'$preferredLocale\', cannot be '
|
||||
"The preferred supported locale, '$preferredLocale', cannot be "
|
||||
'added. Please make sure that there is a corresponding arb file '
|
||||
'with translations for the locale, or remove the locale from the '
|
||||
'preferred supported locale list if there is no intent to support '
|
||||
@@ -631,9 +631,9 @@ class LocalizationsGenerator {
|
||||
final String languageCode = locale.languageCode;
|
||||
final String countryCode = locale.countryCode;
|
||||
|
||||
resultingProperty += '\'$languageCode\'';
|
||||
resultingProperty += "'$languageCode'";
|
||||
if (countryCode != null)
|
||||
resultingProperty += ', \'$countryCode\'';
|
||||
resultingProperty += ", '$countryCode'";
|
||||
resultingProperty += '),\n Locale(';
|
||||
}
|
||||
resultingProperty = resultingProperty.substring(0, resultingProperty.length - '),\n Locale('.length);
|
||||
|
||||
@@ -518,7 +518,7 @@ void main() {
|
||||
expect(generator.supportedLocales.contains(LocaleInfo.fromString('am')), false);
|
||||
});
|
||||
|
||||
test('throws when arb file\'s locale could not be determined', () {
|
||||
test("throws when arb file's locale could not be determined", () {
|
||||
fs.currentDirectory.childDirectory('lib').childDirectory('l10n')
|
||||
..createSync(recursive: true)
|
||||
..childFile('app.arb')
|
||||
|
||||
@@ -18,7 +18,7 @@ void main(List<String> args) {
|
||||
'help',
|
||||
abbr: 'h',
|
||||
negatable: false,
|
||||
help: 'Display the tool\'s usage instructions and quit.',
|
||||
help: "Display the tool's usage instructions and quit.",
|
||||
);
|
||||
|
||||
parser.addOption(
|
||||
@@ -36,7 +36,7 @@ void main(List<String> args) {
|
||||
parser.addOption(
|
||||
'part-of',
|
||||
abbr: 'p',
|
||||
help: 'Library name to add a dart \'part of\' clause for.',
|
||||
help: "Library name to add a dart 'part of' clause for.",
|
||||
);
|
||||
|
||||
parser.addOption(
|
||||
|
||||
@@ -88,8 +88,8 @@ class PathAnimation {
|
||||
if (commandType != currentCommandType)
|
||||
throw Exception(
|
||||
'Paths must be built from the same commands in all frames '
|
||||
'command $commandIdx at frame 0 was of type \'$commandType\' '
|
||||
'command $commandIdx at frame $i was of type \'$currentCommandType\''
|
||||
"command $commandIdx at frame 0 was of type '$commandType' "
|
||||
"command $commandIdx at frame $i was of type '$currentCommandType'"
|
||||
);
|
||||
for (int j = 0; j < numPointsInCommand; j += 1)
|
||||
points[j].add(frame.paths[pathIdx].commands[commandIdx].points[j]);
|
||||
@@ -529,7 +529,7 @@ final RegExp _pixelsExp = RegExp(r'^([0-9]+)px$');
|
||||
int parsePixels(String pixels) {
|
||||
if (!_pixelsExp.hasMatch(pixels))
|
||||
throw ArgumentError(
|
||||
'illegal pixels expression: \'$pixels\''
|
||||
"illegal pixels expression: '$pixels'"
|
||||
' (the tool currently only support pixel units).');
|
||||
return int.parse(_pixelsExp.firstMatch(pixels).group(1));
|
||||
}
|
||||
@@ -540,7 +540,7 @@ String _extractAttr(XmlElement element, String name) {
|
||||
.value;
|
||||
} catch (e) {
|
||||
throw ArgumentError(
|
||||
'Can\'t find a single \'$name\' attributes in ${element.name}, '
|
||||
"Can't find a single '$name' attributes in ${element.name}, "
|
||||
'attributes were: ${element.attributes}'
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user