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

There is a newer version: 8.9.0.37768
Show newest version

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 function parameter names match a provided regular expression.

Noncompliant Code Example

With the default regular expression ^[a-z][a-zA-Z0-9]*$:

public void doSomething(int my_param) { 
  int LOCAL;    
  ...             
}

Compliant Solution

public void doSomething(int myParam) { 
  int local;  
  ...               
}

Exceptions

Loop counters are ignored by this rule.

for (int i = 0; i < limit; i++) {  // Compliant
  // ...
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy