Open isopov opened 10 years ago
FYI: This is google's take on it: http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.4-constant-names
Sounds like this will be tricky to automate. I would be happy with the Intellij approach of optionally ignoring mutables.
@cameronsstone ,
from http://checkstyle.sourceforge.net/google_style.html " Every constant is a static final field, but not all static final fields are constants - impossible to check such rule. "
See https://github.com/checkstyle/checkstyle/issues/23
The following are considered to be constants:
All static final primitive types (Remember that all interface fields are inherently static final). All static final object reference types that are never followed by "." All static final arrays that are never followed by "["
Consider making some options like special treatment for arrays, user-supplied list for types that can be considered constant nevertheless they are objects followed my "." in some cases (e.g. String).