Generate your project report in PDF or from a fully customizable ODT template
Use bitegarden update center or copy jar file downloaded on SonarQube™ plugins folder:
$SONAR_HOME/extensions/plugins/
No analysis is required to generate the reports.
You can find all the related reports clicking in "More..." option and then in "Reporting" section inside your SonarQube™ project space menu.
You will access a new page with all the available reports:
- Executive PDF Summary Report: a clean and minimalistic report with all the information in just one page.
- Issue Breakdown PDF Summary Report: this PDF report extends executive report with issues
breakdown summary by rule (one rule one page). Includes overall metrics and new code metrics along with
issues by rule summary information..
- Full Issue Breakdown PDF Report: extends issues summary breakdown with all issues
information. Includes overall metrics and new code metrics along with all the issues by rule information.
- Excel Report: This excel report contains all the information for your project.
Includes the executive summary as well as all the full issues breakdown.
- Custom Open Document (ODT) Report: a custom report created using an Open Document template that you can modify.
Report Management page provided by bitegarden Report Plugin
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.
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.
The available variables to be used in your template are all the SonarQube available metrics for the project, where the hyphens ('-') have been replaced with underlines ('_').
You can also use the following metadata variables:
project_name
: SonarQube project,app or portfolio name
project_key
: SonarQube project,app or portfolio key
project_version
: SonarQube project,app or portfolio version
analysis_date
: SonarQube project or app analysis date
project_analysis_id
: SonarQube project or app analysis id
branch_name
: SonarQube project or app branch name
project_quality_gate_id
: SonarQube project,app or portfolio Quality Gate id
project_quality_gate_name
: SonarQube project,app or portfolio Quality Gate name
project_quality_gate_is_default
: Return true if SonarQube project,app or portfolio Quality Gate is default or false if not
isPullRequest
: Return true if report is generated from Pull Request or false if not
pull_request
: Return the Pull Request key (if report is generated from Pull Request)
issues_breakdown
: List with all issues sorted by severity and count
severity
: Issue severity
ruleMessage
: Rule message info
type
: Issue type (Bug, Vulnerability, Code Smell)
ruleLanguageName
: Issue language (Java, Javascript,...)
issueCount
: Total issues for specific rule
[#list issues_breakdown as issue] Severity : ${issue.severity} Rule : ${issue.ruleMessage} Type : ${issue.type} Language : ${issue.ruleLanguageName} Issues : ${issue.issueCount} [/#list]
quality_gate_details
status
: Project Quality Gate Status
conditions
: List with Quality Gate Conditions
message
: Condition message
value
: Condition actual value
status
: Condition status
threshold
: Condition threshold configured
comparator
: Condition comparator type (>,<,=,≠)
type
: Condition type (RATING,PERCENTAGE,NUMBER)
Project status: ${quality_gate_details} Conditions: [#list quality_gate_details.conditions as condition] Condition message : ${condition.message} Condition value : ${condition.value} Condition status : ${condition.status} Condition threshold : ${condition.threshold} Condition comparator: ${condition.comparator} Condition type : ${condition.type} [#/list]
sonarqube_project
key
: SonarQube project, app or portfolio key
name
: SonarQube project, app or portfolio name
lastAnalysis
: SonarQube project last analysis date (Only on projects)
version
: SonarQube project version (Only on projects)
sonarQubeQualifierKey
: SonarQube project, app or portfolio qualifier key (TRK, APP, VM, SVW)
sonarQubeQualifierName
: SonarQube project, app or portfolio qualifier name (PROJECT, APPLICATION, PORTFOLIO)
sonarQubeQualifierTranslated
: SonarQube project, app or portfolio qualifier translated (Project, Application, Portfolio)
qualityGateStatus
: SonarQube project, app or portfolio quality gate (OK, ERROR, NONE)
branchName
: SonarQube Project Branch name
isMainBranch
: Define if selected branch is main or not (true, false)
Note: Values are strings not booleans
Project Key: ${sonarqube_project.key} Project Name: ${sonarqube_project.name} Project Last Analysis: ${sonarqube_project.lastAnalysis} Project Version: ${sonarqube_project.version} Project Qualifier Key: ${sonarqube_project.sonarQubeQualifierKey} Project Qualifier Name: ${sonarqube_project.sonarQubeQualifierName} Project Qualifier Translated: ${sonarqube_project.sonarQubeQualifierTranslated} Project Quality Gate: ${sonarqube_project.qualityGateStatus} Project Branch Name: ${sonarqube_project.branchName} Is Main Branch: ${sonarqube_project.isMainBranch}
Check out the default template to see how it works.
FREE TRIAL
300 €/year