Skip to content
mildis edited this page Nov 21, 2015 · 15 revisions

Gerrit Plugin for SonarQube™

This plugin reports Jenkins-triggered SonarQube™ analysis issues on your patchsets to your Gerrit server.
SonarQube™ analyses full project, but only files included in patchset are commented on Gerrit.
Plugin reports -1 or +1 for Code-Review (default) based on severity threshold (default:INFO).

How does it work?

As SonarQube™ analysis starts, triggered by your Jenkins installation, plugin connects to Gerrit and asks what files were changed in the built patchset. SonarQube iterates on every file and if file is contained in a patchset, the plugin collects it's violations and alerts.
When analysis is finished, the plugin connects back to Gerrit again and publish violations and alerts as patchset comments.
Depending on the threshold, plugin votes -1/+1 so submit can be blocked based on your Gerrit settings.

Clone this wiki locally