Skip to content
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 S3242: Rule should not suggest base type for virtual methods #1614

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

Evangelink
Copy link
Contributor

Fix #1537

@Evangelink Evangelink requested a review from valhristov August 3, 2018 16:01
@ghost ghost assigned Evangelink Aug 3, 2018
@ghost ghost added the Status: Needs Review label Aug 3, 2018
if (!(context.SemanticModel.GetDeclaredSymbol(context.Node) is IMethodSymbol methodSymbol) ||
methodSymbol.Parameters.Length == 0 ||
methodSymbol.IsOverride ||
methodSymbol.IsVirtual ||
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is the only real change


public virtual void Test_17(B foo) // Noncompliant
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code was not compiling so I fixed it at the same time.

@valhristov valhristov merged commit 8b05266 into master Aug 6, 2018
@ghost ghost removed the Status: Needs Review label Aug 6, 2018
@valhristov valhristov deleted the ammo/S3242-virtual branch August 6, 2018 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants