Exclude pattern does not affect some rules
A source code analyzer
Brought to you by:
adangel,
juansotuyo
We're using the exclude pattern to ignore auto-generated files like this:
<exclude-pattern>.*/org.terasology.protobuf/.*</exclude-pattern>
The pattern should match and it basically works -- the number of issues goes down by several hundreds, but a few warning types remain. These are:
CollapsibleIfStatements
EmptyIfStmt
UnnecessaryFinalModifier
UselessParentheses
Details can be found in our Jenkins build, the PMD config file is also available online.
It seems as if the four rules do not respect the exclude-pattern statement.
Maybe you're running into the same issue as described here:
https://sourceforge.net/p/pmd/discussion/188193/thread/6e9c6017/#2227
Try, setting in your gradle config both ruleSets and ruleSetFiles:
https://github.com/MovingBlocks/Terasology/blob/develop/config/gradle/common.gradle
Let me know, if this fixes your problem.
Awesome! That did it. Thanks!