Fixed large amount of spelling errors (#83744)

This commit is contained in:
Anis Alibegić
2021-06-02 19:14:06 +02:00
committed by GitHub
parent 9a243a1213
commit c99ed373b3
124 changed files with 223 additions and 220 deletions

View File

@@ -160,7 +160,7 @@ def flutter_install_ios_engine_pod(ios_application_path = nil)
# Generate a fake podspec to represent the Flutter framework.
# This is only necessary because plugin podspecs contain `s.dependency 'Flutter'`, and if this Podfile
# does not add a `pod 'Flutter'` CocoaPods will try to download it from the CoocaPods trunk.
# does not add a `pod 'Flutter'` CocoaPods will try to download it from the CocoaPods trunk.
File.open(copied_podspec_path, 'w') { |podspec|
podspec.write <<~EOF
#
@@ -198,7 +198,7 @@ def flutter_install_macos_engine_pod(mac_application_path = nil)
# Generate a fake podspec to represent the FlutterMacOS framework.
# This is only necessary because plugin podspecs contain `s.dependency 'FlutterMacOS'`, and if this Podfile
# does not add a `pod 'FlutterMacOS'` CocoaPods will try to download it from the CoocaPods trunk.
# does not add a `pod 'FlutterMacOS'` CocoaPods will try to download it from the CocoaPods trunk.
File.open(copied_podspec_path, 'w') { |podspec|
podspec.write <<~EOF
#

View File

@@ -183,7 +183,7 @@ class DeferredComponentsGenSnapshotValidator extends DeferredComponentsValidator
/// considered new.
bool checkAgainstLoadingUnitsCache(
List<LoadingUnit> generatedLoadingUnits) {
final List<LoadingUnit> cachedLoadingUnits = _parseLodingUnitsCache(projectDir.childFile(DeferredComponentsValidator.kLoadingUnitsCacheFileName));
final List<LoadingUnit> cachedLoadingUnits = _parseLoadingUnitsCache(projectDir.childFile(DeferredComponentsValidator.kLoadingUnitsCacheFileName));
loadingUnitComparisonResults = <String, Object>{};
final Set<LoadingUnit> unmatchedLoadingUnits = <LoadingUnit>{};
final List<LoadingUnit> newLoadingUnits = <LoadingUnit>[];
@@ -215,7 +215,7 @@ class DeferredComponentsGenSnapshotValidator extends DeferredComponentsValidator
return loadingUnitComparisonResults!['match']! as bool;
}
List<LoadingUnit> _parseLodingUnitsCache(File cacheFile) {
List<LoadingUnit> _parseLoadingUnitsCache(File cacheFile) {
final List<LoadingUnit> loadingUnits = <LoadingUnit>[];
inputs.add(cacheFile);
if (!cacheFile.existsSync()) {

View File

@@ -68,7 +68,7 @@ enum HostArtifact {
dart2jsSnapshot,
/// The dart snapshot of the dartdev compiler.
dartdevcSnapshot,
/// The dart snpashot of the kernel worker compiler.
/// The dart snapshot of the kernel worker compiler.
kernelWorkerSnapshot,
/// The root of the web implementation of the dart SDK.
flutterWebSdk,

View File

@@ -111,7 +111,7 @@ class LoadingUnit {
/// Constructs a [LoadingUnit].
///
/// Loading units must include an [id] and [libraries]. The [path] is only present when
/// parsing the loading unit from a laoding unit manifest produced by gen_snapshot.
/// parsing the loading unit from a loading unit manifest produced by gen_snapshot.
LoadingUnit({
required this.id,
required this.libraries,

View File

@@ -363,7 +363,7 @@ class Stdio {
/// Adds [stream] to [stdout].
Future<void> addStdoutStream(Stream<List<int>> stream) => stdout.addStream(stream);
/// Adds [srtream] to [stderr].
/// Adds [stream] to [stderr].
Future<void> addStderrStream(Stream<List<int>> stream) => stderr.addStream(stream);
}

View File

@@ -45,7 +45,7 @@ class BuildBundleCommand extends BuildSubCommand {
)
..addOption('asset-dir',
defaultsTo: getAssetBuildDirectory(),
help: 'The output directory for the kernel_blob.bin file, the native snapshet, the assets, etc. '
help: 'The output directory for the kernel_blob.bin file, the native snapshot, the assets, etc. '
'Can be used to redirect the output when driving the Flutter toolchain from another build system.',
)
..addFlag(

View File

@@ -28,7 +28,7 @@ import 'custom_device_config.dart';
import 'custom_device_workflow.dart';
import 'custom_devices_config.dart';
/// Replace all ocurrences of `${someName}` with the value found for that
/// Replace all occurrences of `${someName}` with the value found for that
/// name inside replacementValues or additionalReplacementValues.
///
/// The replacement value is first looked for in [replacementValues] and then
@@ -80,7 +80,7 @@ class CustomDeviceLogReader extends DeviceLogReader {
/// Add all lines emitted by [lines] to this [CustomDeviceLogReader]s [logLines]
/// stream.
///
/// Similiar to [listenToProcessOutput], [logLines] will not be marked as done
/// Similar to [listenToProcessOutput], [logLines] will not be marked as done
/// when the argument stream is done.
///
/// Useful when you want to combine the contents of multiple log readers.
@@ -215,7 +215,7 @@ class CustomDevicePortForwarder extends DevicePortForwarder {
assert(_forwardedPorts.contains(forwardedPort));
// since a forwarded port represents a running process launched with
// the forwardPortCommand, unforwarding is as easy as killing the proces
// the forwardPortCommand, unforwarding is as easy as killing the process
_processManager.killPid(forwardedPort.context.pid);
_forwardedPorts.remove(forwardedPort);
}

View File

@@ -293,7 +293,7 @@ const Feature experimentalInvalidationStrategy = Feature(
),
);
/// The feature for enabling the Windows UWP embeding.
/// The feature for enabling the Windows UWP embedding.
const Feature windowsUwpEmbedding = Feature(
name: 'Flutter for Windows UWP',
configSetting: 'enable-windows-uwp-desktop',

View File

@@ -185,7 +185,7 @@ class FuchsiaPackageServer {
int get port => _port;
/// Uses [FuchiaPM.newrepo] and [FuchsiaPM.serve] to spin up a new Fuchsia
/// Uses [FuchsiaPM.newrepo] and [FuchsiaPM.serve] to spin up a new Fuchsia
/// package server.
///
/// Returns false if the repo could not be created or the server could not

View File

@@ -101,15 +101,15 @@ class AndroidPlugin extends PluginPlatform {
'package': package,
'class': pluginClass,
// Mustache doesn't support complex types.
'supportsEmbeddingV1': _supportedEmbedings.contains('1'),
'supportsEmbeddingV2': _supportedEmbedings.contains('2'),
'supportsEmbeddingV1': _supportedEmbeddings.contains('1'),
'supportsEmbeddingV2': _supportedEmbeddings.contains('2'),
};
}
Set<String>? _cachedEmbeddingVersion;
/// Returns the version of the Android embedding.
Set<String> get _supportedEmbedings => _cachedEmbeddingVersion ??= _getSupportedEmbeddings();
Set<String> get _supportedEmbeddings => _cachedEmbeddingVersion ??= _getSupportedEmbeddings();
Set<String> _getSupportedEmbeddings() {
assert(pluginPath != null);

View File

@@ -671,7 +671,7 @@ abstract class ResidentHandlers {
/// Called to print help to the terminal.
void printHelp({ @required bool details });
/// Perfor a hot reload or hot restart of all attached applications.
/// Perform a hot reload or hot restart of all attached applications.
///
/// If [fullRestart] is true, a hot restart is performed. Otherwise a hot reload
/// is run instead. On web devices, this only performs a hot restart regardless of
@@ -1812,7 +1812,7 @@ abstract class DevtoolsLauncher {
Future<void> close();
/// When measuring devtools memory via addtional arguments, the launch process
/// When measuring devtools memory via additional arguments, the launch process
/// will technically never complete.
///
/// Us this as an indicator that the process has started.

View File

@@ -789,7 +789,7 @@ abstract class FlutterCommand extends Command<void> {
argParser.addMultiOption(
FlutterOptions.kAndroidProjectArgs,
help: 'Additional arguments specified as key=value that are passed directly to the gradle '
'project via the -P flag. These can be accesed in build.gradle via the "project.property" API.',
'project via the -P flag. These can be accessed in build.gradle via the "project.property" API.',
splitCommas: false,
abbr: 'P',
);
@@ -897,7 +897,7 @@ abstract class FlutterCommand extends Command<void> {
'ABI must be specified at a time with the "--target-platform" flag. When building for iOS, '
'only the symbols from the arm64 architecture are used to analyze code size.\n'
'By default, the intermediate output files will be placed in a transient directory in the '
'build directory. This can be overriden with the "--${FlutterOptions.kCodeSizeDirectory}" option.\n'
'build directory. This can be overridden with the "--${FlutterOptions.kCodeSizeDirectory}" option.\n'
'This flag cannot be combined with "--${FlutterOptions.kSplitDebugInfoOption}".'
);

View File

@@ -185,7 +185,7 @@ Future<vm_service.VmService> setUpVmService(
vm_service.VmService vmService
) async {
// Each service registration requires a request to the attached VM service. Since the
// order of these requests does not mattter, store each future in a list and await
// order of these requests does not matter, store each future in a list and await
// all at the end of this method.
final List<Future<vm_service.Success>> registrationRequests = <Future<vm_service.Success>>[];
if (reloadSources != null) {

View File

@@ -103,7 +103,7 @@ class UwpTool {
return true;
}
/// Installs a developer signing cerificate.
/// Installs a developer signing certificate.
///
/// Returns `true` on success.
Future<bool> installCertificate(String certificatePath) async {

View File

@@ -160,7 +160,7 @@ void main() {
'time',
],
completer: Completer<void>.sync(),
// Example stack trace from an incorrectly named application:name in the AndroidManfiest.xml
// Example stack trace from an incorrectly named application:name in the AndroidManifest.xml
stdout:
'$kDummyLine'
'05-11 12:54:46.665 E/AndroidRuntime(11787): FATAL EXCEPTION: main\n'

View File

@@ -143,7 +143,7 @@ void main() {
await forwarder.unforward(ForwardedPort(456, 23));
});
testWithoutContext('failures to unforward port print error but are non-fatral', () async {
testWithoutContext('failures to unforward port print error but are non-fatal', () async {
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
const FakeCommand(
command: <String>['adb', '-s', '1', 'forward', '--remove', 'tcp:456'],

View File

@@ -145,13 +145,13 @@ void main() {
});
testWithoutContext('succeeds with coldboot launch', () async {
final List<String> kEmulatorLauchColdBootCommand = <String>[
final List<String> kEmulatorLaunchColdBootCommand = <String>[
...kEmulatorLaunchCommand,
'-no-snapshot-load'
];
final AndroidEmulator emulator = AndroidEmulator(emulatorID,
processManager: FakeProcessManager.list(<FakeCommand>[
FakeCommand(command: kEmulatorLauchColdBootCommand),
FakeCommand(command: kEmulatorLaunchColdBootCommand),
]),
androidSdk: mockSdk,
logger: BufferLogger.test(),

View File

@@ -367,7 +367,7 @@ Review licenses that have not been accepted (y/N)?
);
// Test with valid SDK and valid build tools
// Will still be partial because AnroidSdk.findJavaBinary is static :(
// Will still be partial because AndroidSdk.findJavaBinary is static :(
sdkVersion.sdkLevel = kAndroidSdkMinVersion;
sdkVersion.buildToolsVersion = kAndroidSdkBuildToolsMinVersion;

View File

@@ -68,11 +68,11 @@ void main() {
expect(io.ProcessSignal.sigint.toString(), ProcessSignal.sigint.toString());
});
testWithoutContext('exit throws a StateError if called without being overriden', () {
testWithoutContext('exit throws a StateError if called without being overridden', () {
expect(() => exit(0), throwsAssertionError);
});
testWithoutContext('exit does not throw a StateError if overriden', () {
testWithoutContext('exit does not throw a StateError if overridden', () {
try {
setExitFunctionForTests((int value) {});

View File

@@ -227,7 +227,7 @@ void main() {
testWithoutContext('Automatically cleans old outputs when build graph changes', () async {
final BuildSystem buildSystem = setUpBuildSystem(fileSystem);
final TestTarget testTarget = TestTarget((Environment envionment) async {
final TestTarget testTarget = TestTarget((Environment environment) async {
environment.buildDir.childFile('foo.out').createSync();
})
..inputs = const <Source>[Source.pattern('{PROJECT_DIR}/foo.dart')]
@@ -238,7 +238,7 @@ void main() {
expect(environment.buildDir.childFile('foo.out'), exists);
final TestTarget testTarget2 = TestTarget((Environment envionment) async {
final TestTarget testTarget2 = TestTarget((Environment environment) async {
environment.buildDir.childFile('bar.out').createSync();
})
..inputs = const <Source>[Source.pattern('{PROJECT_DIR}/foo.dart')]
@@ -250,7 +250,7 @@ void main() {
expect(environment.buildDir.childFile('foo.out'), isNot(exists));
});
testWithoutContext('Does not crash when filesytem and cache are out of sync', () async {
testWithoutContext('Does not crash when filesystem and cache are out of sync', () async {
final BuildSystem buildSystem = setUpBuildSystem(fileSystem);
final TestTarget testWithoutContextTarget = TestTarget((Environment environment) async {
environment.buildDir.childFile('foo.out').createSync();
@@ -278,7 +278,7 @@ void main() {
testWithoutContext('Reruns build if stamp is corrupted', () async {
final BuildSystem buildSystem = setUpBuildSystem(fileSystem);
final TestTarget testWithoutContextTarget = TestTarget((Environment envionment) async {
final TestTarget testWithoutContextTarget = TestTarget((Environment environment) async {
environment.buildDir.childFile('foo.out').createSync();
})
..inputs = const <Source>[Source.pattern('{PROJECT_DIR}/foo.dart')]
@@ -566,7 +566,7 @@ void main() {
logger: BufferLogger.test(),
fileSystem: fileSystem,
);
final Environment testEnvironmentProfle = Environment.test(
final Environment testEnvironmentProfile = Environment.test(
fileSystem.currentDirectory,
outputDir: fileSystem.directory('output'),
defines: <String, String>{
@@ -590,11 +590,11 @@ void main() {
// Verify debug output was created
expect(fileSystem.file('output/debug'), exists);
await buildSystem.build(releaseTarget, testEnvironmentProfle);
await buildSystem.build(releaseTarget, testEnvironmentProfile);
// Last build config is updated properly
expect(testEnvironmentProfle.outputDir.childFile('.last_build_id'), exists);
expect(testEnvironmentProfle.outputDir.childFile('.last_build_id').readAsStringSync(),
expect(testEnvironmentProfile.outputDir.childFile('.last_build_id'), exists);
expect(testEnvironmentProfile.outputDir.childFile('.last_build_id').readAsStringSync(),
'c20b3747fb2aa148cc4fd39bfbbd894f');
// Verify debug output removeds

View File

@@ -35,7 +35,7 @@ void main() {
artifacts = Artifacts.test();
});
testWithoutContext('Android AOT targets has analyicsName', () {
testWithoutContext('Android AOT targets has analyticsName', () {
expect(androidArmProfile.analyticsName, 'android_aot');
});

View File

@@ -161,7 +161,7 @@ void main() {
);
expect(nextInvalidationResult.uris, contains(Uri.parse('.packages')));
// The PackagConfig should have been recreated too
// The PackageConfig should have been recreated too
expect(nextInvalidationResult.packageConfig,
isNot(invalidationResult.packageConfig));
});

View File

@@ -156,7 +156,7 @@ void main() {
OutputPreferences: () => OutputPreferences.test(),
});
testUsingContext('Doesnt crash on invalid .packages file', () async {
testUsingContext("Doesn't crash on invalid .packages file", () async {
final FlutterCommandRunner runner = createTestCommandRunner(DummyFlutterCommand()) as FlutterCommandRunner;
fileSystem.file('pubspec.yaml').createSync();
fileSystem.file('.packages')

View File

@@ -82,7 +82,7 @@ void main() {
}), throwsStateError);
});
test('Doesnt throw a StateError if Timer is left cleaned up', () async {
test("Doesn't throw a StateError if Timer is left cleaned up", () async {
final Testbed testbed = Testbed();
await testbed.run(() async {

View File

@@ -134,7 +134,7 @@ void main() {
cacheDir: fileSystem.currentDirectory,
);
// Create cache dir that the Chrome launcher will atttempt to persist, and a file
// Create cache dir that the Chrome launcher will attempt to persist, and a file
// that will thrown an exception when it is read.
const String directoryPrefix = '/.tmp_rand0/flutter_tools_chrome_device.rand0/Default';
fileSystem.directory('$directoryPrefix/Local Storage')
@@ -187,7 +187,7 @@ void main() {
cacheDir: fileSystem.currentDirectory,
);
// Create cache dir that the Chrome launcher will atttempt to persist.
// Create cache dir that the Chrome launcher will attempt to persist.
fileSystem.directory('/.tmp_rand0/flutter_tools_chrome_device.rand0/Default/Local Storage')
.createSync(recursive: true);

View File

@@ -30,13 +30,13 @@ void main() {
final FlutterRunTestDriver flutter = FlutterRunTestDriver(tempDir);
const String newBackgroundMessage = 'New Background';
final Completer<void> sawForgroundMessage = Completer<void>.sync();
final Completer<void> sawForegroundMessage = Completer<void>.sync();
final Completer<void> sawBackgroundMessage = Completer<void>.sync();
final Completer<void> sawNewBackgroundMessage = Completer<void>.sync();
final StreamSubscription<String> subscription = flutter.stdout.listen((String line) {
print('[LOG]:"$line"');
if (line.contains('Main thread') && !sawForgroundMessage.isCompleted) {
sawForgroundMessage.complete();
if (line.contains('Main thread') && !sawForegroundMessage.isCompleted) {
sawForegroundMessage.complete();
}
if (line.contains('Isolate thread')) {
sawBackgroundMessage.complete();
@@ -47,7 +47,7 @@ void main() {
},
);
await flutter.run();
await sawForgroundMessage.future;
await sawForegroundMessage.future;
await sawBackgroundMessage.future;
project.updateTestIsolatePhrase(newBackgroundMessage);

View File

@@ -35,7 +35,7 @@ const Map<String, String> localEngineDebugBuildModeRelease = <String, String>{
};
// Can't use a debug build with a profile engine.
const Map<String, String> localEngineProfileBuildeModeRelease = <String, String>{
const Map<String, String> localEngineProfileBuildModeRelease = <String, String>{
'SOURCE_ROOT': '../examples/hello_world',
'FLUTTER_ROOT': '../..',
'LOCAL_ENGINE': '/engine/src/out/ios_profile',
@@ -71,7 +71,7 @@ void main() {
await expectXcodeBackendFails(unknownConfiguration);
await expectXcodeBackendFails(unknownFlutterBuildMode);
await expectXcodeBackendFails(localEngineDebugBuildModeRelease);
await expectXcodeBackendFails(localEngineProfileBuildeModeRelease);
await expectXcodeBackendFails(localEngineProfileBuildModeRelease);
}, skip: !io.Platform.isMacOS);
test('Xcode backend warns archiving a non-release build.', () async {

View File

@@ -50,7 +50,7 @@ final Map<Type, Generator> _testbedDefaults = <Type, Generator>{
/// Manages interaction with the tool injection and runner system.
///
/// The Testbed automatically injects reasonable defaults through the context
/// DI system such as a [BufferLogger] and a [MemoryFileSytem].
/// DI system such as a [BufferLogger] and a [MemoryFileSystem].
///
/// Example:
///