
org.sonar.l10n.java.rules.squid.S00115.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 constant names match a provided regular expression.
The following code snippet illustrates this rule when the regular expression value is "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$":
public class MyClass {
public static final int first = 1; // Non-Compliant
public static final int SECOND = 2; // Compliant
}
public enum MyEnum {
first, // Non-Compliant
SECOND; // Compliant
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy