
org.sonar.plugins.csharp.S3872.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonarlint-omnisharp-plugin Show documentation
Show all versions of sonarlint-omnisharp-plugin Show documentation
Code Analyzer based on Omnisharp
Why is this an issue?
The name of a method should communicate what it does, and the names of its parameters should indicate how they’re used. If a method and its
parameter have the same name it is an indication that one of these rules of thumb has been broken, if not both. Even if by some trick of language
that’s not the case, it is still likely to confuse callers and maintainers.
Noncompliant code example
public void Login(string login) // Noncompliant
{
//...
}
Compliant solution
public void Login(string userName)
{
//...
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy