-
Notifications
You must be signed in to change notification settings - Fork 232
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
Fix S1144 FP: Ignore unused Deconstruct
methods
#9470
Conversation
} | ||
|
||
private class Ambiguous | ||
{ | ||
public void Deconstruct(out string a, out string b, out string c) { a = b = c = null; } | ||
public void Deconstruct(out object a, out object b, out object c) { a = b = c = null; } // Noncompliant FP, actually the one above is not used | ||
public void Deconstruct(out object a, out object b, out object c) { a = b = c = null; } // Compliant, Deconstruct methods are ignored FP, actually the one above is not used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public void Deconstruct(out object a, out object b, out object c) { a = b = c = null; } // Compliant, Deconstruct methods are ignored FP, actually the one above is not used | |
public void Deconstruct(out object a, out object b, out object c) { a = b = c = null; } // Compliant, Deconstruct methods are ignored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - minor comment
f462780
to
0cc577b
Compare
|
|
Fixes #3842
To merge after #9459
S1144 will now ignore unused
Deconstruct
methods.It ignores methods named
Deconstruct
with at least 1 parameter and when all parameters have theout
reference keyword.