checkstyle module name ConstantName vs ConstantNameCheck

29 views
Skip to first unread message

Eugene Peh

unread,
Jan 30, 2017, 2:49:32 AM1/30/17
to checkstyle

Hello all,

I have a question to ask regarding checkstyle. It seems that the checkstyle api accepts both module name, ConstantName and ConstantNameCheck for the configuration file, checkstyle.xml.


I would like to ask why is there a double standard here even though documentations on http://checkstyle.sourceforge.net/ only promotes ConstantName module and what is the difference between using either of them? Will either one of them gets deprecated in future?


Thanks!

Roman Ivanov

unread,
Jan 30, 2017, 2:40:04 PM1/30/17
to Eugene Peh, checkstyle
Hi Eugene,

Both name are allowed for now, because checkstyle use brute force approach to load module in all known packages .... that is old design ... and we stuck with support of it for now.

Checkstyle try to fin module lcas in classpath in order: 
1) ConstantName 
2) ConstantNameCheck

It was done only for simplification of user configuration, to let user skip "Check" prefix everywhere. 

Will either one of them gets deprecated in future?

No decision are made yet. 
In far future most likely we become more strict with names so user should provide full name. Right now whole world use short names so ... most likely we will continue to support that


FYI:

​thanks,
Roman Ivanov

Eugene Peh

unread,
Jan 30, 2017, 10:24:01 PM1/30/17
to checkstyle, euge...@gmail.com

Hi Roman,

Thanks for the reply,
May I also ask why does the Eclipse's Checkstyle plugin -> Checkstyle Configuration only detects 
Module with short names? (It does not show up in the configuration above if its using full name)
Will it be fixed anytime soon? Thanks!

Roman Ivanov

unread,
Jan 31, 2017, 1:01:12 PM1/31/17
to Eugene Peh, checkstyle
it is better to ask at https://sourceforge.net/p/eclipse-cs/discussion/
here we do only checkstyle library, all IDE plugins are separate projects, that is good question to their  maintainers ....
Reply all
Reply to author
Forward
0 new messages