Steps to reproduce:
- Create a Java class that should produce a warning, for example "com.MyBadClass"
- In the ruleset file specify:
<exclude-pattern>.*/com/MyBadClass.*</exclude-pattern>
<exclude-pattern>.*/com/.*</exclude-pattern>
- The warning is shown for the MyBadClass.
Hi,
I tried to reproduce the bug, but I couldn't (with PMD 5.0.1/5.0.2).
Which version of PMD were you using?
Can you try out the attached project? Simply unzip it and adjust the path in run-pmd.sh (or run-pmd.bat) and run it. Does it detect the JumbledIncrementor violation for you?
Or can you adjust this project, so that you can reproduce the issue?
Thanks,
Andreas
I used pmd-5.1.0-SNAPSHOT.jar from net.sourceforge.pmd.eclipse.plugin_4.0.0.201211080927.jar.
Diff:
Alright - I move this bug to the eclipse module. PMD itself seems to be fine.