org.sonar.plugins.csharp.S3872.html Maven / Gradle / Ivy
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 - 2024 Weber Informatics LLC | Privacy Policy