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

org.sonar.l10n.java.rules.squid.S00117.html Maven / Gradle / Ivy

Sharing some naming conventions is a key point to make it possible for a team to efficiently collaborate. This rule allows to check that all local variable and method parameter names match a provided regular expression.

The following code snippet illustrates this rule when the regular expression value is "^[a-z][a-zA-Z0-9]*$":

public class MyClass {
  public void method() {
    int FIRST;                      // Non-Compliant
    int second;                     // Compliant
  }

  public void method2(int VALUE) {  // Non-Compliant
  }

  public void method3(int value) {  // Compliant
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy