Open dex3r opened 3 years ago
Yes, I can implement such an analyzer.
There is a built-in one to detect those cases under methods with async modifier. You will see the following warning if you add async
to your Use
method in the sample:
CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
Take a look at a SO question I have asked: https://stackoverflow.com/questions/65891357/is-there-a-way-to-warn-about-an-unawaited-tasks
Someone suggested this package, however it does not cover such case.
Is this something that can potentially be added to AsyncFixer?