fix a number of spelling errors (#2333)
diff --git a/lib/src/command/lish.dart b/lib/src/command/lish.dart
index 9a45636..53525ec 100644
--- a/lib/src/command/lish.dart
+++ b/lib/src/command/lish.dart
@@ -151,7 +151,7 @@
}
/// Returns the value associated with [key] in [map]. Throws a user-friendly
- /// error if [map] doens't contain [key].
+ /// error if [map] doesn't contain [key].
dynamic _expectField(Map map, String key, http.Response response) {
if (map.containsKey(key)) return map[key];
invalidServerResponse(response);
diff --git a/lib/src/entrypoint.dart b/lib/src/entrypoint.dart
index 5e71fba..14743da 100644
--- a/lib/src/entrypoint.dart
+++ b/lib/src/entrypoint.dart
@@ -542,7 +542,7 @@
/// The [packagePathsMapping] is a mapping from package names to paths where
/// the packages are located. (The library is located under
/// `lib/` relative to the path given).
- bool _isPackagePathsMappingUptodateWithLockfile(
+ bool _isPackagePathsMappingUpToDateWithLockfile(
Map<String, String> packagePathsMapping) =>
lockFile.packages.values.every((lockFileId) {
// It's very unlikely that the lockfile is invalid here, but it's not
@@ -605,7 +605,7 @@
packagePathsMapping[package] = packagePath;
}
- if (!_isPackagePathsMappingUptodateWithLockfile(packagePathsMapping)) {
+ if (!_isPackagePathsMappingUpToDateWithLockfile(packagePathsMapping)) {
outOfDate();
}
}
@@ -661,7 +661,7 @@
packagePathsMapping[pkg.name] =
root.path('.dart_tool', p.fromUri(pkg.rootUri));
}
- if (!_isPackagePathsMappingUptodateWithLockfile(packagePathsMapping)) {
+ if (!_isPackagePathsMappingUpToDateWithLockfile(packagePathsMapping)) {
outOfDate();
}
diff --git a/lib/src/error_group.dart b/lib/src/error_group.dart
index 1702fc8..313e4c5 100644
--- a/lib/src/error_group.dart
+++ b/lib/src/error_group.dart
@@ -46,7 +46,7 @@
/// we can check if it has listeners and signal errors on it.
_ErrorGroupFuture _done;
- /// Returns a [Future] that completes successully when all members of [this]
+ /// Returns a [Future] that completes successfully when all members of [this]
/// are complete, or with an error if any member receives an error.
///
/// This [Future] is effectively in the group in that an error on it won't be
diff --git a/lib/src/global_packages.dart b/lib/src/global_packages.dart
index 71053d6..d1074c0 100644
--- a/lib/src/global_packages.dart
+++ b/lib/src/global_packages.dart
@@ -758,7 +758,7 @@
}
// Write this as the system encoding since the system is going to execute
- // it and it might contain non-ASCII caharacters in the pathnames.
+ // it and it might contain non-ASCII characters in the pathnames.
writeTextFile(binStubPath, bash, encoding: const SystemEncoding());
// Make it executable.
diff --git a/lib/src/io.dart b/lib/src/io.dart
index 4396b93..afe9102 100644
--- a/lib/src/io.dart
+++ b/lib/src/io.dart
@@ -259,7 +259,7 @@
var whitelistFilter = createFileFilter(whitelist);
// This is used in some performance-sensitive paths and can list many, many
- // files. As such, it leans more havily towards optimization as opposed to
+ // files. As such, it leans more heavily towards optimization as opposed to
// readability than most code in pub. In particular, it avoids using the path
// package, since re-parsing a path is very expensive relative to string
// operations.
diff --git a/lib/src/lock_file.dart b/lib/src/lock_file.dart
index 5da71a2..21d2c84 100644
--- a/lib/src/lock_file.dart
+++ b/lib/src/lock_file.dart
@@ -240,7 +240,7 @@
/// This file is planned to eventually replace the `.packages` file.
///
/// If [entrypoint] is passed, an accompanying [entrypointSdkConstraint]
- /// should be given, these identifiy the current package in which this file is
+ /// should be given, these identify the current package in which this file is
/// written. Passing `null` as [entrypointSdkConstraint] is correct if the
/// current package has no SDK constraint.
Future<String> packageConfigFile(
diff --git a/lib/src/log.dart b/lib/src/log.dart
index 79a73eb..4e592d9 100644
--- a/lib/src/log.dart
+++ b/lib/src/log.dart
@@ -60,8 +60,8 @@
final _noColor = getSpecial('\u001b[39m');
final _bold = getSpecial('\u001b[1m');
-/// All color codees.
-var _allColors = [_cyan, _green, _magenta, _red, _yellow, _blue, ''];
+/// All color codes.
+final _allColors = [_cyan, _green, _magenta, _red, _yellow, _blue, ''];
/// An enum type for defining the different logging levels a given message can
/// be associated with.
diff --git a/lib/src/package.dart b/lib/src/package.dart
index b52e9b6..1392dd2 100644
--- a/lib/src/package.dart
+++ b/lib/src/package.dart
@@ -220,7 +220,7 @@
if (!dirExists(beneath)) return [];
// This is used in some performance-sensitive paths and can list many, many
- // files. As such, it leans more havily towards optimization as opposed to
+ // files. As such, it leans more heavily towards optimization as opposed to
// readability than most code in pub. In particular, it avoids using the
// path package, since re-parsing a path is very expensive relative to
// string operations.
diff --git a/lib/src/pubspec.dart b/lib/src/pubspec.dart
index 6b78916..4786470 100644
--- a/lib/src/pubspec.dart
+++ b/lib/src/pubspec.dart
@@ -633,7 +633,7 @@
if (sourceNames.length > 1) {
_error('A dependency may only have one source.', specNode.span);
} else if (sourceNames.isEmpty) {
- // Default to a hosted dependency if no source is specifid.
+ // Default to a hosted dependency if no source is specified.
sourceName = 'hosted';
descriptionNode = nameNode;
}
diff --git a/lib/src/rate_limited_scheduler.dart b/lib/src/rate_limited_scheduler.dart
index 99f9ce3..2c76412 100644
--- a/lib/src/rate_limited_scheduler.dart
+++ b/lib/src/rate_limited_scheduler.dart
@@ -95,7 +95,7 @@
///
/// When [callback] returns, all jobs that where prescheduled by [callback]
/// that have not started running will be removed from the work queue
- /// (if they have been added seperately by [schedule] they will still be
+ /// (if they have been added separately by [schedule] they will still be
/// executed).
Future<R> withPrescheduling<R>(
FutureOr<R> Function(void Function(J) preschedule) callback,
diff --git a/lib/src/sdk/dart.dart b/lib/src/sdk/dart.dart
index 2837ca4..328995d 100644
--- a/lib/src/sdk/dart.dart
+++ b/lib/src/sdk/dart.dart
@@ -31,7 +31,7 @@
static final String _rootDirectory = () {
if (runningFromDartRepo) return p.join(dartRepoRoot, 'sdk');
- // The Dart exectuable is in "/path/to/sdk/bin/dart", so two levels up is
+ // The Dart executable is in "/path/to/sdk/bin/dart", so two levels up is
// "/path/to/sdk".
var aboveExecutable = p.dirname(p.dirname(Platform.resolvedExecutable));
assert(fileExists(p.join(aboveExecutable, 'version')));
diff --git a/lib/src/solver/incompatibility.dart b/lib/src/solver/incompatibility.dart
index c5ec0e2..26e72f3 100644
--- a/lib/src/solver/incompatibility.dart
+++ b/lib/src/solver/incompatibility.dart
@@ -12,7 +12,7 @@
///
/// See https://github.com/dart-lang/pub/tree/master/doc/solver.md#incompatibility.
class Incompatibility {
- /// The mutually-incompatibile terms.
+ /// The mutually-incompatible terms.
final List<Term> terms;
/// The reason [terms] are incompatible.
diff --git a/lib/src/solver/incompatibility_cause.dart b/lib/src/solver/incompatibility_cause.dart
index 86bede5..4202e82 100644
--- a/lib/src/solver/incompatibility_cause.dart
+++ b/lib/src/solver/incompatibility_cause.dart
@@ -33,7 +33,7 @@
/// conflict resolution.
class ConflictCause implements IncompatibilityCause {
/// The incompatibility that was originally found to be in conflict, from
- /// which the target incompatiblity was derived.
+ /// which the target incompatibility was derived.
final Incompatibility conflict;
/// The incompatibility that caused the most recent satisfier for [conflict],
diff --git a/lib/src/solver/version_solver.dart b/lib/src/solver/version_solver.dart
index 78c80a1..92ff7d2 100644
--- a/lib/src/solver/version_solver.dart
+++ b/lib/src/solver/version_solver.dart
@@ -70,7 +70,7 @@
final Set<String> _overriddenPackages;
/// The set of packages for which the lockfile should be ignored and only the
- /// most recent versions shuld be used.
+ /// most recent versions should be used.
final Set<String> _useLatest;
/// The set of packages for which we've added an incompatibility that forces
@@ -181,7 +181,7 @@
}
}
- // If *all* terms in [incompatibility] are satsified by [_solution], then
+ // If *all* terms in [incompatibility] are satisfied by [_solution], then
// [incompatibility] is satisfied and we have a conflict.
if (unsatisfied == null) return #conflict;
diff --git a/lib/src/source.dart b/lib/src/source.dart
index fed9fe4..ce35fb0 100644
--- a/lib/src/source.dart
+++ b/lib/src/source.dart
@@ -52,7 +52,7 @@
abstract class Source {
/// The name of the source.
///
- /// Should be lower-case, suitable for use in a filename, and unique accross
+ /// Should be lower-case, suitable for use in a filename, and unique across
/// all sources.
String get name;
diff --git a/lib/src/source/path.dart b/lib/src/source/path.dart
index 7ee64bc..45b827a 100644
--- a/lib/src/source/path.dart
+++ b/lib/src/source/path.dart
@@ -128,7 +128,7 @@
dynamic serializeDescription(String containingPath, description) {
if (description['relative']) {
return {
- 'path': relativePathWithPosixSeperators(
+ 'path': relativePathWithPosixSeparators(
p.relative(description['path'], from: containingPath)),
'relative': true
};
@@ -138,7 +138,7 @@
/// On both Windows and linux we prefer `/` in the pubspec.lock for relative
/// paths.
- static String relativePathWithPosixSeperators(String path) {
+ static String relativePathWithPosixSeparators(String path) {
assert(p.isRelative(path));
return p.posix.joinAll(p.split(path));
}
diff --git a/test/list_package_dirs/ignores_updated_pubspec_test.dart b/test/list_package_dirs/ignores_updated_pubspec_test.dart
index fb4f5fd..a1db04e 100644
--- a/test/list_package_dirs/ignores_updated_pubspec_test.dart
+++ b/test/list_package_dirs/ignores_updated_pubspec_test.dart
@@ -30,7 +30,7 @@
// Note: Using canonicalize here because pub gets the path to the
// entrypoint package from the working directory, which has had symlinks
// resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we
- // need to accomodate that.
+ // need to accommodate that.
await runPub(args: [
'list-package-dirs',
diff --git a/test/list_package_dirs/includes_dev_dependencies_test.dart b/test/list_package_dirs/includes_dev_dependencies_test.dart
index 65db401..ef06dff 100644
--- a/test/list_package_dirs/includes_dev_dependencies_test.dart
+++ b/test/list_package_dirs/includes_dev_dependencies_test.dart
@@ -29,7 +29,7 @@
// Note: Using canonicalize here because pub gets the path to the
// entrypoint package from the working directory, which has had symlinks
// resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we
- // need to accomodate that.
+ // need to accommodate that.
await runPub(args: [
'list-package-dirs',
'--format=json'
diff --git a/test/list_package_dirs/lists_dependency_directories_test.dart b/test/list_package_dirs/lists_dependency_directories_test.dart
index 91c9de0..4baaa56 100644
--- a/test/list_package_dirs/lists_dependency_directories_test.dart
+++ b/test/list_package_dirs/lists_dependency_directories_test.dart
@@ -30,7 +30,7 @@
// Note: Using canonicalize here because pub gets the path to the
// entrypoint package from the working directory, which has had symlinks
// resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we
- // need to accomodate that.
+ // need to accommodate that.
await runPub(args: [
'list-package-dirs',
'--format=json'