I had some uncomfortable intermittent errors in which the async methods returned invalid rather than Task, and therefore they were not expected. in order to avoid such problems in the future, I am trying to create a custom template to highlight methods such as warnings.
I created a template, for example:
async void $methodname$($arguments$) { $statements$ }
(where the arguments and statements allow an unlimited number of matches of each and the method - this is an identifier containing 1 or more characters of a legal identifier)
Oddly enough, this emphasizes all void methods, not just async void methods. Can anyone see my mistake? Since this looks like a generic template that is trying to match, and Google is not reporting this, I doubt that this is an unresolved issue in Reshaper 8.2.1.
PS I know that my template will not conform to general methods - if I can make it work for non-general methods, I will fix this later)
UPDATE
As noted in the comments, I understand that there are a number of false positives and false negatives that this rule did not handle. My concern is how to get asynchronous matching for working in resharper - as soon as this works, I can look to make the rule more precise.
source share