Hello,
Per java:S115:
public enum MyEnum {
OptionOne,
OptionTwo;
}
is non-compliant and should be written as
public enum MyEnum {
OPTION_ONE,
OPTION_TWO;
}
While we understand that enforcing UPPER_SNAKE_CASE follows java conventions, we sometimes find it too restrictive and would actually prefer the PascalCase instead for enum constants.
Would it be possible to introduce a separate Sonar rule for enum-constant names? It would default to the same (customizable) pattern as java:s115 (so there’d be no change for most users), but could be overridden if needed.
Many thanks