I'm trying to configure FindBugs to ignore missing equals methods for data object classes (name ends with DO suffix). The documentation says that this should work:
<Match>
<Class name=".*DO" />
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
</Match>
However it doesn't and I'm starting to doubt that regex is supported for Class/@name. Interesting thing is that this actually works:
<Match classregex=".*DO">
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
</Match>
P.S.: I'm using FindBugs 2.0.1
You need to add a tilde before regexs in FindBugs. So it should look more like this:
<Match>
<Class name="~.*DO" />
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
</Match>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With