Skip to content

Commit 0e5f60e

Browse files
srawlinsCommit Queue
authored andcommitted
linter: enforce unnecessary_async
Change-Id: If5d025ccf2d1a6d80256579bee7a7b3a4d039dde Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429061 Reviewed-by: Keerti Parthasarathy <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 53f2113 commit 0e5f60e

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

pkg/linter/analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ linter:
4848
- test_types_in_equals
4949
- throw_in_finally
5050
- unawaited_futures # pedantic
51+
- unnecessary_async
5152
- unnecessary_breaks
5253
- unnecessary_final
5354
- unnecessary_ignore

pkg/linter/test/rule_test_support.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ class PubPackageResolutionTest with MockPackagesMixin, ResourceProviderMixin {
264264
}
265265

266266
/// Asserts that there are no diagnostics in the given [content].
267-
Future<void> assertNoDiagnostics(String content) async =>
267+
Future<void> assertNoDiagnostics(String content) =>
268268
assertDiagnostics(content, const []);
269269

270270
/// Asserts that there are no diagnostics in the file at the given [path].
271-
Future<void> assertNoDiagnosticsInFile(String path) async =>
271+
Future<void> assertNoDiagnosticsInFile(String path) =>
272272
assertDiagnosticsInFile(path, const []);
273273

274274
/// Asserts that no diagnostics are reported when resolving [content].

pkg/linter/test/validate_incompatible_rules_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void main() {
1111
registerLintRules();
1212
for (var rule in Registry.ruleRegistry) {
1313
for (var incompatibleRule in rule.incompatibleRules) {
14-
test(rule.name, () async {
14+
test(rule.name, () {
1515
var referencedRule = Registry.ruleRegistry.firstWhere(
1616
(r) => r.name == incompatibleRule,
1717
);

pkg/linter/test/validate_no_rule_description_references_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void main() {
1616
() {
1717
registerLintRules();
1818
for (var rule in Registry.ruleRegistry) {
19-
test(rule.name, () async {
19+
test(rule.name, () {
2020
var result = Process.runSync('grep', [
2121
'-R',
2222
rule.description,

pkg/linter/test/verify_reflective_test_suites_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class _VerifyTests {
7979
}
8080
}
8181
var relativePath = path.relative(directory.path, from: testDirPath);
82-
test(relativePath, () async {
82+
test(relativePath, () {
8383
if (testFileNames.isEmpty) return;
8484
if (testAllFile == null) return;
8585

0 commit comments

Comments
 (0)