Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Create ExtendedConstantNameCheck sticktly following java convention for UPPER_CASE naming #155

Open
isopov opened this Issue Nov 2, 2013 · 3 comments

Comments

Projects
None yet
4 participants
Owner

isopov commented Nov 2, 2013

See checkstyle/checkstyle#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).

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.

@daniilyar daniilyar removed the enhancement label Aug 15, 2014

Owner

romani commented Jul 3, 2015

@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. "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment