0
votes

For our CI builds, we are using a company-wide set of rules for PMD and Checkstyle. They are packaged as a Maven artifact in an internal repository and are pulled on every build.

I would like to use those same rules in Sonar, but the only approach I have found is to download and unpack the rules manually, then import them into a Sonar quality profile individually. This has several downsides - there is more work to do, the rules are not kept up-to-date automatically and the import of PMD rulesets does not work properly out of the box - the referenced rulesets are not being found.

Is there a way to tell Sonar to pull an artifact with common rules from a Maven repo or a better way to configure quality profiles and keep them in sync?

1
I'm not aware of such. I'd recommend you to ask this question in Sonar user mail list. - Andrew Logvinov

1 Answers

1
votes

Sonar stopped supporting this feature quite a while back.

There used to be a sonar.reuseExistingRulesConfiguration which allowed existing rules to be reused. But this was removed from sonar-2.3. See this and this.