roslyn: Analyzer to enforce "Async" suffix on methods returning tasks

It’s quite common that I call out the need for an Async suffix on a method name during code review.

Given this is a standard convention, would a diagnostic that flagged violations make sense?

It would improve productivity by reducing feedback loops in several projects for which I review PRs.

Another convention such an analyzer may wish to support is When* methods, such as Task.WhenAll and friends, which do not end with Async.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 15 (12 by maintainers)

Most upvoted comments

Thanks. From that discussion I found https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD200.md. It feels to me this should be considered as an in-box analyzer.