Incorrect naming convention warning with async
For methods that return a Task or Task<T>, please do not flag an invalid naming convention if the method name ends in Async. That's actually correct as someone could be implementing a method manually, or it could be a method in an interface that returns a Task or Task<T> where the implementation uses async/await.
Thanks,
Please sign in to leave a comment.
Any update on this?
Thanks
Hello Oren
ReSharper should consider method names ending with 'Async' as correct. If you're seeing other behavior, could you please attach a screenshot demonstrating the warning? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I've attached a couple of screen shots from build 14. If I add "async" to the implementation, then the warning goes way, but the reality is that the 'async' keyword isn't what defines the pattern but the return type is. I'm free to create my own method that returns a Task that doesn't use await and the naming convention should be Async.
The Async naming convention rule is a good one -- but it should look for the return type of Task or Task<T> not the 'async' keyword.
Thanks
Attachment(s):
Async warning 2.png
Async warning.png
Absolutely right! I've created few issues about this:
http://youtrack.jetbrains.net/issue/RSRP-287169
http://youtrack.jetbrains.net/issue/RSRP-287395
Nearly 4 years later, is there any chance https://youtrack.jetbrains.com/issue/RSRP-287169 is going to be fixed soon?