Expected Behavior:
All 3 methods show the diagnostic.
Actual Behavior:
Only Test1 shows the diagnostic.
I know that you explicitly have to configure a "async modifier" in the naming rule. But there is no other way to configure a rule for methods with awaitable return types.
Version Used: VS 17.9.6
Steps to Reproduce: EditorConfig:
Sample code:
Diagnostic Id: IDE1006 Naming rule violation: Missing suffix: 'Async'
Expected Behavior: All 3 methods show the diagnostic.
Actual Behavior: Only
Test1
shows the diagnostic.I know that you explicitly have to configure a "async modifier" in the naming rule. But there is no other way to configure a rule for methods with awaitable return types.
Note: I wasn't sure about
Test3
, but VSTHRD200 does show it as requiring an "Async" suffix (related issue: https://github.com/microsoft/vs-threading/issues/431). Also there is this comment from @stephentoub: https://github.com/dotnet/runtime/issues/27547#issuecomment-478384285