Test classes do not need equals or hashCode
Our test classes frequently have fields, eg for mock injection, but as far as I can tell, there is no reason for them to implement equals or hashCode. IMC_IMMATURE_CLASS_NO_EQUALS and IMC_IMMATURE_CLASS_NO_TOSTRING should not apply.
I'm not sure of the best way to identify unit test classes, but the presence of annotated test methods should be fairly quick to check. Filename patterns aren't the most reliable, but it's worth at least considering the default Surefire patterns.
reasonable
hold on. this should already be happening. The code looks for annotations on any method of the class that if (type.startsWith("Lorg/junit/") || type.startsWith("Lorg/testng/")) {
is there something wrong there?
Hmm, looks like you're right. We had an exclusion rule for that, but maybe it's outdated now.