-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement diagnostic and code fix for SA1101 PrefixLocalCallsWithThis #447
Conversation
I think the only reasonable way to do the testing for this is create a helper method that takes an enum value representing each of the above category and builds a test for that case. |
|
Since I really want to get this feature in a release, I'm implemented initial testing on a variety of edge cases in the above list. |
I'm merging this one now that tests are in place so it gets included in the Alpha 2 release. |
Implement diagnostic and code fix for SA1101 PrefixLocalCallsWithThis
Fixes #35
The number of test cases is large to say the least. Basically I need to choose one item from each of the categories below and build a test for that set of conditions.
var x = this.Property;
)var x = this.Property.GetHashCode();
)nameof
expressionThis gives a maximum of 4704 tests for complete coverage, although some combinations do not make since (e.g. you cannot assign to an element within a documentation comment or
nameof
expression).