Blog post

Customizing Sonar to Fit Your Needs

Olivier Gaudin photo

Olivier Gaudin

CEO & Co-founder


Editor's Note: This is an outdated blog post. Regardless, we're glad you've found Sonar!  You can find more information on SonarQube here.

Sonar is a super-radiator for code quality and as such, you can expect it brings value to all stakeholders in a development group. To achieve this, Sonar must be able to show only relevant information in a certain context and shut off the noise to facilitate investigation and decision making. In this post, I will show how to customize Sonar to fit your needs by:

  • creating filters that choose components and metrics to report on
  • building your own widgets and dashboards
  • selecting default dashboards displayed
  • using the notification services and stay tuned

To start customizing Sonar, you first need to log in.

Creating Your Own Filters

The measures service located in the top navigation bar enables to choose which components you wish to retrieve and which measures you want to display for these components. Once you have chosen these criteria, you will get what we call a filter. A filter can be saved, and updated... Filters are fully compatible with differential services, so you can display variations as well.

We will see later on how to display a filter in a dashboard. See the Measures Service documentation page to learn more on filters.

Building Your Own Dashboards

To make sure you maximize value in Sonar, you have the ability to create your own dashboards and select the widgets they display. Two types of dashboards are available:

  • Projects dashboards: to display quality indicators on a component such as a Project, a View or a Developer. Once you create such a dashboard, it will be available to any component.
  • Global dashboards: to mix any information on different projects. A global dashboard will only be available on the home page. You can look at Nemo for an example.

To create a new dashboard, you can use the Manage Dashboard link from the home page (for a global dashboard) or from a project page (for a project dashboard). Once the dashboard is created, you can then configure by a drag & drop of widgets.

There are many available widgets, but to configure a widget that uses your own filter, you should pick the "Measure Filter as List" or "Measure Filter as Tremap" widgets and choose the filter you created.

Choose Default Dashboards

Now that you know how to customize Sonar for your own needs, you also might want to customize the default dashboard that anyone can see. Once you have created the dashboards you want to use by default, you will need to share them. Once they are shared, go to settings, configuration and Default Dashboards. You can pick from there what you want as default for global and project dashboards.

Subscribing to Notifications

Finally, to stay tuned, you can subscribe to notifications that you will receive by email. Go to YourUserName > My Profile and tick what you want to subscribe to in the Notifications section.

You may also want to receive a quality report on a regular basis. Thanks to the Report plugin, you can select which global dashboards you would like to receive by email as a PDF report and how often.

Time now to give it a try. Enjoy and give us feedback!