very_good_analysis icon indicating copy to clipboard operation
very_good_analysis copied to clipboard

[Feature Request] Add discarded_futures

Open ricardodalarme opened this issue 2 years ago • 1 comments

Description

Making asynchronous calls in non-async functions usually signals a programming error. These functions should generally be marked async, and such futures should probably be awaited (as enforced by unawaited_futures).

So, to avoid this kind of problem, it would be really nice to have the discarded_futures included in the analysis.

Documentation

  • https://dart-lang.github.io/linter/lints/discarded_futures.html

ricardodalarme avatar May 08 '23 21:05 ricardodalarme

After some reasearch, seems like there are some unresolved false positives issues with this rule.

https://github.com/dart-lang/linter/issues/3801

https://github.com/dart-lang/linter/issues/4085

https://github.com/dart-lang/linter/issues/4375

Dealing with false positives is the biggest blocker for this issue to be added to VG analysis IMO

renancaraujo avatar Aug 07 '23 18:08 renancaraujo

With this issue being open for over a year and no new comments, along with Dart issues still being open on it, closing this out as a won't fix. If this should be re-addressed in the future feel free to open another issue with updated information.

tomarra avatar Jul 16 '24 15:07 tomarra