dart-code-checker / dart-code-metrics

Software analytics tool that helps developers analyse and improve software quality.
https://dcm.dev
Other
860 stars 265 forks source link

[BUG] avoid-redundant-async false positive #1223

Open praxa-enzo opened 1 year ago

praxa-enzo commented 1 year ago

Environment and configuration

DCM version: 5.7.2 Dart SDK version: 2.19.6

Configuration ```yaml 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

Additional comments

No response