Reputation: 351
I am using SonarQube v 5.0.1 I have put my rules.xml file in extensions/rules/pmd directory. Now everything works if i use sonar-pmd-plugin version 2.3 - i start sonar, go to rules search and can find all the rules in rules.xml file. But after switching to sonar-pmd-plugin version 2.4 i can't find my rules. I have switched PMD version in older (v 2.3) plugin and it had no effect so i guess it's not PMD, it's the plugin. Has the default directory of rules changed with latest pmd plugin or something? Couldn't find anything in documentation.
Upvotes: 0
Views: 598
Reputation: 15
I had the issue with Sonarqube 5.6.3 and the sonar-pmd-plugin 2.6. So, to see my custom rules I need to do the following:
Add the custom rules in the pmd.properties file in the plugin, this files is in org/sonar/l10n/. E.g.:
#Add pmdAtgRules
rule.pmd.ActionClassName.name=ActionClassName
rule.pmd.BreaksLogging.name=BreaksLogging
Upvotes: 0
Reputation: 48
I had the same issue with Sonarqube 4.5.5. Downgrading the sonar-pmd-plugin from 2.4 to 2.3 solved it. Now I can see the custom rules I put in extensions/rules/pmd.
Upvotes: 1