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

Rule S2234: Parameters should be passed in the correct order #2262

Merged
merged 4 commits into from
Feb 7, 2019

Conversation

Evangelink
Copy link
Contributor

Fix #2055

@ghost ghost assigned Evangelink Feb 5, 2019
@ghost ghost added the Status: Needs Review label Feb 5, 2019
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace SonarAnalyzer.Helpers
{
// todo: this should come from the Roslyn API (https://github.com/dotnet/roslyn/issues/9)
internal class CSharpMethodParameterLookup
internal class CSharpMethodParameterLookup : AbstractMethodParameterLookup<ArgumentSyntax>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of the code has been extracted and factorized in a base class.


var memberAccess = methodCall.Expression as MemberAccessExpressionSyntax;
Location getLocation() =>
memberAccess == null
Copy link
Contributor

Choose a reason for hiding this comment

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

partial test coverage

{
if (argumentList == null)
{
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

not covered by tests (is it possible?)

Copy link
Contributor

@andrei-epure-sonarsource andrei-epure-sonarsource left a comment

Choose a reason for hiding this comment

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

lgtm!

@Evangelink Evangelink merged commit f310ce8 into master Feb 7, 2019
@Evangelink Evangelink deleted the ammo/S2234 branch February 7, 2019 14:56
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