When developers implement if-then-else statements with a leading '!' (negation) in the conditional it renders them harder to read and comprehend: Poor implementation: if (!x.isClosed()) { doThis() } else { doThat() } Better implementation by removing negation and flipping the statements: if (x.isClosed()) { doThat() } else { doThis() } I would like to see a rule that detects leading a '!' in the condition and whether it could be removed if an else clause exists by swapping. Its applicable to a number...
Hi Steve, The current Eclipse plugin does something similar to what you're describing....
Just played with it, there are some UI bugs in that view but the searches should...
If you use PMD in Eclipse, there is a relatively new XPath Designer view in it that...
I would suggest writing up some documentation on how it works and how users can enable...
Well, regardless of where you new rule resides, it seems that something in your system...
Paths to rules now have to include the target language to be valid in PMD 5.xx onward....
It just pertains to the local file. I think it would be a challenge to make the right...