David Corley - 2007-04-19

Logged In: YES
user_id=1025393
Originator: YES

The same level of information is also missing in the UnusedImports violation in the xml report.

Essentially what I'm seeing now is:

<file name="xxx/xxx/xxx/yyy.java">
<violation line="72" rule="UseSingleton" ruleset="Design Rules" package="xxx.xxx.xxx" externalinfourl="http://pmd.sourceforge.net/rules/design.html#UseSingleton" priority="5">
All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
</violation>
</file>
======================================
I think for the violations in question the xml report should also include the class information, i.e.:
=======================================
<file name="xxx/xxx/xxx/yyy.java">
<violation line="72" rule="UseSingleton" ruleset="Design Rules" package="xxx.xxx.xxx" class="" externalinfourl="http://pmd.sourceforge.net/rules/design.html#UseSingleton" priority="5">
All methods in are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
</violation>
</file>

OR

<file name="xxx/xxx/xxx/yyy.java">
<violation line="72" rule="UseSingleton" ruleset="Design Rules" package="xxx.xxx.xxx" externalinfourl="http://pmd.sourceforge.net/rules/design.html#UseSingleton" priority="5">
All methods in YYY are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning.
</violation>
</file>

In both cases, the class info is either added as an attribute or the class name is specifically mentioned in the violation message. UseSingleton, ExcessiveClassLength, and UnusedImports should all adhere to adding this info.