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

Implement SA1315: ParametersShouldMatchInheritedNames #1949

Open
sharwell opened this issue Dec 11, 2015 · 8 comments
Open

Implement SA1315: ParametersShouldMatchInheritedNames #1949

sharwell opened this issue Dec 11, 2015 · 8 comments
Assignees
Milestone

Comments

@sharwell
Copy link
Member

Category: Naming
Title: Parameters should match inherited names
Description: When a method overrides a method from a base class, or implements an interface method, the parameter names of the overriding method should match the names in the base definition.

This rule is an enforcement of the special case added to SA1313 in #1372.

@bexxx
Copy link
Collaborator

bexxx commented Dec 11, 2015

This is a "duplicate" to CA1725 of FxCop (https://msdn.microsoft.com/en-us/library/ms182251.aspx).
Although I like to have it in StyleCop :)

@sharwell
Copy link
Member Author

💭 Maybe treat this as a duplicate of dotnet/roslyn-analyzers#457, but then we don't have control over the release process. Or we could implement it as a new StyleCop rule and contribute the result back for the FxCop port.

@sharwell
Copy link
Member Author

Looks like the FxCop port to Roslyn is looking back at us as well:

Notes:

See if StyleCop has implemented it

@bexxx
Copy link
Collaborator

bexxx commented Dec 12, 2015

Let's do it :). You can assign the diagnostic part to me if we agree to do it. I will look into the renaming part of the fix afterwards.

@vweijsters
Copy link
Contributor

👍 I'd say we go for it.

@nbarbettini
Copy link
Contributor

👍

@pdelvo
Copy link
Member

pdelvo commented Dec 17, 2015

Im grabbing this.

@sharwell sharwell modified the milestones: 1.1.0, Backlog Dec 17, 2015
@sharwell sharwell changed the title New rule proposal: ParametersShouldMatchInheritedNames Implement SA1315: ParametersShouldMatchInheritedNames Dec 30, 2015
@vweijsters
Copy link
Contributor

Based on the work of @pdelvo (#2015) I created an implementation for roslyn-analyzers (dotnet/roslyn-analyzers#911).

If we decide to include it in StyleCop analyzers as well, our implementation should match the one in roslyn-analyzers.

I've marked this as needs discussion again to determine if we want to include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants