Reputation: 11
I'm using Sonar v3.5.1 & PMD V4.3 and I want to add custom rules to my PMD runner written in Java.
How should I add new rules to the pmd-rules.xml
configuration file, so I can get the custom rules reporting in Sonar?
Any help is appreciated.
Upvotes: 1
Views: 3206
Reputation: 7484
This document has everything you need to write a custom rule in Java for PMD v4.3: http://pmd.sourceforge.net/pmd-4.3.0/howtowritearule.html
If it's possible it would also be good to update PMD to the latest 5.x version, configuration will be friendlier.
Let me know if this helped.
Upvotes: 1