typos (#1924)
diff --git a/lib/src/rules/avoid_returning_null_for_void.dart b/lib/src/rules/avoid_returning_null_for_void.dart
index ec06a90..c5d2bc1 100644
--- a/lib/src/rules/avoid_returning_null_for_void.dart
+++ b/lib/src/rules/avoid_returning_null_for_void.dart
@@ -17,7 +17,7 @@
In a large variety of languages `void` as return type is used to indicate that
a function doesn't return anything. Dart allows returning `null` in functions
with `void` return type but it also allow using `return;` without specifying any
-value. To have a consistant way you should not return `null` and only use an
+value. To have a consistent way you should not return `null` and only use an
empty return.
**BAD:**
diff --git a/lib/src/rules/empty_statements.dart b/lib/src/rules/empty_statements.dart
index 2bd78f4..227ac08 100644
--- a/lib/src/rules/empty_statements.dart
+++ b/lib/src/rules/empty_statements.dart
@@ -11,7 +11,7 @@
const _details = r'''
-**AVOID** empty statments.
+**AVOID** empty statements.
Empty statements almost always indicate a bug.
diff --git a/lib/src/rules/hash_and_equals.dart b/lib/src/rules/hash_and_equals.dart
index d307bce..5a2cd90 100644
--- a/lib/src/rules/hash_and_equals.dart
+++ b/lib/src/rules/hash_and_equals.dart
@@ -18,7 +18,7 @@
Every object in Dart has a `hashCode`. Both the `==` operator and the
`hashCode` property of objects must be consistent in order for a common hash
map implementation to function properly. Thus, when overriding `==`, the
-`hashCode` should also be overriden to maintain consistency. Similarly, if
+`hashCode` should also be overridden to maintain consistency. Similarly, if
`hashCode` is overridden, `==` should be also.
**BAD:**
diff --git a/lib/src/rules/no_logic_in_create_state.dart b/lib/src/rules/no_logic_in_create_state.dart
index 9c4d235..137542e 100644
--- a/lib/src/rules/no_logic_in_create_state.dart
+++ b/lib/src/rules/no_logic_in_create_state.dart
@@ -14,7 +14,7 @@
**DON'T** put any logic in `createState()`.
Implementations of `createState()` should return a new instance
-of a State object and do nothing more. Since state access is prefered
+of a State object and do nothing more. Since state access is preferred
via the `widget` field, passing data to `State` objects using custom
constructor parameters should also be avoided and so further, the State
constructor is required to be passed no arguments.
diff --git a/lib/src/rules/null_closures.dart b/lib/src/rules/null_closures.dart
index 856b580..1f827c0 100644
--- a/lib/src/rules/null_closures.dart
+++ b/lib/src/rules/null_closures.dart
@@ -38,7 +38,7 @@
#### Static functions
* From `dart:async`
- * `sheduleMicrotask` at the 0th positional parameter
+ * `scheduleMicrotask` at the 0th positional parameter
* `Future.doWhile` at the 0th positional parameter
* `Future.forEach` at the 0th positional parameter
* `Future.wait` at the named parameter `cleanup`
diff --git a/lib/src/rules/prefer_generic_function_type_aliases.dart b/lib/src/rules/prefer_generic_function_type_aliases.dart
index 013ca53..d8af315 100644
--- a/lib/src/rules/prefer_generic_function_type_aliases.dart
+++ b/lib/src/rules/prefer_generic_function_type_aliases.dart
@@ -18,7 +18,7 @@
parameterization that users might want to express. Generic function type aliases
(`typedef F = void Function()`) fixed that issue.
-For consistancy and readability reasons, it's better to only use one syntax and
+For consistency and readability reasons, it's better to only use one syntax and
thus prefer generic function type aliases.
**BAD:**
diff --git a/test/formatter_test.dart b/test/formatter_test.dart
index 05db076..413f91e 100644
--- a/test/formatter_test.dart
+++ b/test/formatter_test.dart
@@ -111,7 +111,7 @@
});
});
- group('machine-ouptut', () {
+ group('machine-output', () {
test('write', () {
out.buffer.clear();
SimpleFormatter([info], null, out,
diff --git a/test/rule_test.dart b/test/rule_test.dart
index 9d9c9f2..21e4bd5 100644
--- a/test/rule_test.dart
+++ b/test/rule_test.dart
@@ -180,8 +180,8 @@
var bad = ['if', '42', '3', '2f'];
testEach(bad, isValidDartIdentifier, isFalse);
});
- group('libary_name_prefixes', () {
- bool isGoodPrefx(List<String> v) => matchesOrIsPrefixedBy(
+ group('library_name_prefixes', () {
+ bool isGoodPrefix(List<String> v) => matchesOrIsPrefixedBy(
v[3],
Analyzer.facade.createLibraryNamePrefix(
libraryPath: v[0], projectRoot: v[1], packageName: v[2]));
@@ -193,7 +193,7 @@
['/u/b/c/test/data/a.dart', '/u/b/c', 'acme', 'acme.test.data.a'],
['/u/b/c/lib/acme.dart', '/u/b/c', 'acme', 'acme']
];
- testEach(good, isGoodPrefx, isTrue);
+ testEach(good, isGoodPrefix, isTrue);
var bad = [
['/u/b/c/lib/src/a.dart', '/u/b/c', 'acme', 'acme.a'],
@@ -201,7 +201,7 @@
['/u/b/c/test/a.dart', '/u/b/c', 'acme', 'acme.a'],
['/u/b/c/test/data/a.dart', '/u/b/c', 'acme', 'acme.test.a']
];
- testEach(bad, isGoodPrefx, isFalse);
+ testEach(bad, isGoodPrefix, isFalse);
});
});
}
diff --git a/test/rules/list_remove_unrelated_type.dart b/test/rules/list_remove_unrelated_type.dart
index 32ff422..d2ed83b 100644
--- a/test/rules/list_remove_unrelated_type.dart
+++ b/test/rules/list_remove_unrelated_type.dart
@@ -26,7 +26,7 @@
void someFunction4_1() {
List list;
- if(list.remove(null)) print('someFucntion4_1');
+ if(list.remove(null)) print('someFunction4_1');
}
void someFunction5_1() {
diff --git a/test/rules/void_checks.dart b/test/rules/void_checks.dart
index 1f11b95..0fa4f7e 100644
--- a/test/rules/void_checks.dart
+++ b/test/rules/void_checks.dart
@@ -192,7 +192,7 @@
f = () async {}; // OK
}
-allow_expression_fonction_body() {
+allow_expression_function_body() {
forget(void Function() f) {}
int i;
forget(() => i); // OK