How to display Technical Debt measures in SonarQube

This short tutorial shows how to add/display technical debt measures (remediation costs caused by code quality defects, actually coding rule violations) in your SonarQube dashboards, by using Scertify™ TechDebt, our plugin dedicated to code quality assessment & benchmarking and technical debt management.

Once you analyzed your project with SonarQube and measured technical debt by using Scertify™ TechDebt, you’d probably like to display this information in your dashboards. The tutorial below will teach you how to easily do that, assuming that you have already installed Scertify™ TechDebt within a running instance of Sonar.

  • Log into SonarQube as an administrator
  • Select a project or a group of projects
  • Click on “Configure widgets”
  • In the “Custom Measures” category, click on “Add widget”
  • From the “Custom Measures” widget pane, select a project or a group of projects
  • In the “Metric 1″ drop down list, select “Technical debt” from the group named “Tocea”
  • Click on “Save”
  • Go back to your dashboard, the metric is now available.

For the time being, the Technical Debt value is expressed in minutes, but we’re sure you can do the math! This metric is computed on active rules in your quality profile.

How to use this metric in your dashboards

As for all metrics in SonarQube, the value is computed at each level of an artifact (project, component, package, file) and can be displayed in many ways in your dashboards. Find below some nice places in your dashboard where it’s useful to have the info.

Helicopter view
  • Measure Filter as Treemap: if you have a lot of projects, you can quickly identify those that have some Technical Debt issues and start investigating them.
  • Measure Filter as List: Sort your project list by Technical Debt, or -may be more interesting- by variation since the last analysis. In this way, you can spot projects that CREATE technical debt, wether “legacy” or not.

Project view
  • Project Technical Debt value, to drill-down into artefacts
  • Technical Debt Hotspots (list of worst components based on the value of the Technical Debt metric).

Using this Scertify™ metric enables you to quickly spot those components that will surely cost an arm and a leg in a near future!

Method of computation

The method for computing & aggregating the technical debt of a code artifact can’t be easier: addition!

Want to customize remediation costs?

In the default configuration of the free TechDebt Community plugin, remediation costs for each coding rules are set by Tocea’s consultants and are regularly updated thanks to our TechDebt.org project repository (+6,800 real projects coming from various industries & technologies, +1500M lines of code analyzed).

However, for many reasons you might want to customize them with your own experience. To do so, download the commercial version of Scertify™ TechDebt which includes a local benchmarking server and a configuration tool that allows you to modify unit remediation costs.

[separator_shadow][/separator_shadow]

About Scertify™ TechDebt

Scertify™ TechDebt includes exclusive features such as: accurate customization of Technical Debt measurement (expressed in days, based on code defects), benchmarking of SonarQube’s projects against local or community repositories (see http://techdebt.org), generation & export to JIRA of technical debt-oriented task plans, quality assessment overviews, full detailed PDF reports…

Scertify™ TechDebt is a server-based product (unlimited users).

[separator_shadow][/separator_shadow]

Posted by
Michael MULLER (See other posts)

+10 years experienced Marketing & Communication Manager, specialized in Technology & Innovating companies. Marketing Manager at Tocea. Executive editor at http://dsisionnel.com, a french IT magazine. Creator of http://d8p.it, a cool url shortener. Dad of 2 kids.

One thought on “How to display Technical Debt measures in SonarQube

  1. Pingback: How to display Technical Debt measures in Sonar...

Comments are closed.