Question

I have a project which is built by Jenkins. I have installed the Jenkins SonarQube plugin, and added a build step to run the Sonar analysis.

This works fine, and issues are appearing in my Sonar dashboard correctly.

I have written some custom Findbugs rules, and I would like to add them to this analysis. I have written a Findbugs plugin (which I have tested using the Findbugs standalone runner), and I have written a Sonar plugin which wraps the Findbugs plugin (based on the fb-contrib sonar plugin).

I have installed my Sonar plugin on my Sonar server (at /opt/sonar/extensions/plugins), but it does not affect the Jenkins build.

I have looked at the Jenkins configuration for the Jenkins SonarQube plugin, and one of the options is where Sonar should be installed from. It is currently set to install Sonar from "maven". There are no options which appear to affect which Sonar plugins will be used.

How can I get my custom Findbugs rules into this toolchain?

Was it helpful?

Solution

Make sure that you have added your custom FindBugs rules to your quality profile. If you can't add them to the profile, then the plugin is not loading correctly. But maybe you just need to activate the new rules in the quality profile.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top