Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Roman Ivanov (romanivanov)
Assigned to: Nobody/Anonymous (nobody)
Summary: new check: AbbreviationAsWordInTypeNameCheck
Example: XMLReader should be names like XmlReader.
JShell name is ok - but JavaShell for some group of developers is preferable variant and they want to forbid "JShell" to stress distance from java api or standard classes (JPane , J.......).
Check name of the type to varidate abbreviations in capital letters.
Rule is simple: allowedCapitalCounts+1 and more capital character in sequence in name is not allowed.
Basic Options: extend AbbreviationAsWordInTypeNameCheck from TypeNameCheck
Option: int allowedCapitalCounts; //default is 2
Option: String ignoreNames; // will be regexp for exceptions in rules
We need to have ignore list to allow user to cover whole code by this rule, and do Name refactoring gradual for existing code. Some names are very hard to change (they are part of API or any other contract), so ignore list of names is vital.
Comment By: Roman Ivanov (romanivanov)
Date: 2012-04-18 20:47
>> int allowedCapitalCounts; //default is 2
This option the only reason, and only this option helped to reconsile
disputes about naming of the classes in our company. With regular
expression there was too much exceptions. Without this option we can not
switch this check at all.