All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.plugins.csharp.S3872.html Maven / Gradle / Ivy

There is a newer version: 10.2.0.105762
Show newest version

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