Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ PMDPlugin custom ruleset

I want to use custom rulesets with the PMDPlugin in IntelliJ 2016.1 (on Windows).

The Plugin page tells me

PMD supports custom ruleset file, to configure goto settings -> PMD and add the rule set files that are required.

but i can't find any setting to configure the PMDPlugin (I'm using version 1.7.7). In fact when i'm searching for PMD the only item listed in the search results of the settings menu is the Plugin itself. And under Tools -> Run PMD the Custom Rules are greyed out.

I found on this page a possible solution but it doesn't worked for me. And if it would i would like to change the rulesets for different projects and i don't want to modify the IDEA rules for each.

Also i found a solution to set PMD as an external tool, but i like how other plugins (e.g. Checkstyle-IDEA) integrate into the IDE. I also checked the QA-Plug with the PMD extension but there you can just select the settings and don't specify a custom ruleset.

like image 709
Luis Morales Avatar asked Oct 31 '25 21:10

Luis Morales


1 Answers

I think you are looking in the wrong place. Go to File > Settings > Other Settings > PMD and there should be a + sign like below:

enter image description here

From there you can add your own custom rulesets (*.XML files).

like image 66
dambros Avatar answered Nov 03 '25 01:11

dambros



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!