This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
[BUG] avoid-redundant-async false positive #1223
Open
Description
Environment and configuration
DCM version: 5.7.2
Dart SDK version: 2.19.6
Configuration
include: package:lints/recommended.yaml
analyzer:
plugins:
- dart_code_metrics
dart_code_metrics:
rules:
- avoid-redundant-async
What did you do?
Future<void> foo() async {
await for (final value in Stream.fromIterable([0, 1, 2])) {
print(value);
}
}
What did you expect to happen?
No warnings.
What actually happened?
Linter warning: 'async' keyword is redundant, consider removing it.
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response