Sonarqube Game

Gamification for Sonarqube

As described in the Game Modes page, the Sonarqube integration with Quboo encourages people to fix the issues flagged by this popular tool.

How does the integration work?

First, you need to install the Quboo Plugin for Sonarqube. This plugin runs a task after your project analysis in Sonarqube, gets some generic data about the issues that were fixed and by whom, and sends it to the Quboo server. There, we compute the new score based on your ‘legacy date’ settings (see below) and update the leaderboards.

The integration with Sonarqube has been designed to be extremely simple. You don’t need to create players or change the ‘legacy date’, this is done automatically.

For more information about setting up the Sonarqube plugin, check the Plugin documentation page.

The game

The goal of the Sonarqube integration is simple: solve as many Sonarqube issues as you can. You get a higher score for the most severe issues, and for the ones having higher technical debt in Sonarqube.

A very important concept in this game is the “Legacy Code”. It doesn’t look obvious at a first glance, but surely you don’t want to play a game where developers can introduce their own new issues in Sonarqube and fix them right after. Normally, you want people to fix old issues, the ones that are a consequence of some decisions you made in the past, but that you want to fix now. We also refer to this as Technical Debt. For that reason, you have to define a date in this game mode: the Legacy Date. Only the issues that are older than this date count to get score.

What do you do to prevent teams from creating new issues that will become the technical debt later? You can solve that with Sonarqube’s quality gates. If you do this right, at some point you shouldn’t need to use Quboo’s Sonarqube integration anymore, because you got rid of all the legacy debt in your software project.

If you want to know more about Legacy Code and how to motivate people to fix problems related to it, check our blog post Getting rid of Legacy Code with Gamification.

Enabling and configuring the integration

The Sonarqube integration is enabled by default when you create your Quboo account. You can configure it from the Settings page.

Legacy Date configuration

There are two ways you can configure the Legacy Date:

  • Sliding (default). The legacy date will be always a time offset compared with today’s date (according to your timezone). You can configure the time offset as a specified number of days. As an example: if today is October 27th, 2021 and the ‘Days before today’ setting is 90, the Legacy Date will be set to July 29th, 2021. Remember: only the Sonar issues created before that date will count for the score.
  • Fixed date. In this case, you set the Legacy date by yourself to a fixed date. It won’t change over days or campaigns.

Sonarqube’s Base URL

Here you can introduce the URL that your organization uses to access the Sonarqube UI. It does not need to be publicly accessible, we won’t connect to this URL.

We use this URL to compose search pages that your players can use to figure out what issues give score. This URL will be visible on the Leaderboard pages.

Access and Secret Keys

You must use these two keys after installing the Sonarqube plugin. We use them to connect your data to your Quboo account in a secure way.

Visit the Plugin Documentation page for more information about where to use these keys.