Shared coding conventions allow teams to collaborate efficiently. This rule checks that all constant names match a provided regular expression.
With the default regular expression ^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$
:
public class MyClass { public static final int first = 1; } public enum MyEnum { first; }
public class MyClass { public static final int FIRST = 1; } public enum MyEnum { FIRST; }