Affects PMD Version:
6.4.0
Description:
A class containg only static constants triggers violation that it should be renamed to end with either Utils or Helper
Code Sample demonstrating the issue:
public final class StringConstants {
public static final String YES = "Y";
public static final String NO = "N";
private StringConstants(){
}
}
Error Message:
The utility class name 'StringConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper)'
Running PMD through: Maven
Other Info
You can reproduce this issue in the unit test by adding this entry
<test-code>
<description>Class containing constants</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public final class StringConstants {
public static final String YES = "Y";
public static final String NO = "N";
private StringConstants(){
}
}
]]></code>
</test-code>
to file : ClassNamingConventions.xml
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4