Report Plugin for SonarQube™

Generate your project report from a fully customizable ODT template

Try it free Buy Now

Installation and setup is quite easy

  1. Use bitegarden update center or copy jar file downloaded on SonarQube™ plugins folder:

    $SONAR_HOME/extensions/plugins/
  2. Restart SonarQube server.
  3. Log in with administrator rights, go to your SonarQube™ global settings, and then select the plugin in general settings.
  4. Paste license key and save.

It is required a new analysis in order to view the results.

Customize your report template

Create your custom template and setup the plugin to use your file through administration settings.

Download the default template to see how it works

Report Plugin for SonarQube™ allows you to configure the template file globally or at project level. Besides, the templates are provided through URLs, so it is not mandatory to have access to the machine where SonarQube™ is running.

Report configuration

The report configuration is the template itself. This template is an OpenDocument text document and can be easily edited with OpenOffice or LibreOffice.

To generate the templates, a subset of the FreeMarker language template is used. Some valid expressions are:

  • ${ncloc} : Replaces the expression ncloc with its value. If ncloc is not available at execution time the report generation will stop.
  • ${ncloc!} : Replaces the expression ncloc with its value if exists.
  • ${ncloc!"No lines"} : Replaces the expression ncloc with its value if exists. Otherwise, it will show "No lines" (without the double quotes).
  • [#if ncloc > 10000] : If ncloc > 10000 we show everything till "else", otherwise, we show the next text block.
    Big project
    [#else]
    Small project
    [/#if]

You have to be careful with how OpenOffice generates the templates. It happens oftenly that expressions are not saved as a single element. To fix this, we need to click on "clear direct formatting" (select text and click right button).

Notice that, in order to work properly, all the expressions must be well formed and have to be evaluable.

Available variables in report generation time

The available variables are all the SonarQube metrics for the project, where the hyphens ('-') have been replaced with underlines ('_'), and others like project_name, project_description, analysis_date y analysis_version.

Sending your report by email

To send the report by email you must set the SMTP settings in Settings --> General --> Email. After this, you will have to fill in the field Mailing list at the plugin configuration with the recipient list (comma-separated).

PDF generation

To generate the report in PDF format, OpenOffice must be installed in our computer. Then, we need to fill in the OpenOffice path field at the configuration section, that indicates the path to the installation directory of the OpenOffice tool.

Finally, we need to activate the generation of PDF format, properties also available at the configuration section of the plugin.

Get your SonarQube™ reports right now!



Download and Try

FREE TRIAL

  • 14 days evaluation license
  • After submitting the form you will receive the trial key by email