The Measures service provides a way to quickly execute all kinds of queries on project measures. You can for example get:
- the recently inspected projects
- the projects with blocker and critical issues
- the projects with bad coverage on added/changed code within the 10 past days
The search query can then be saved as a filter to be displayed on dashboards.
The Measures service can be accessed through the top bar.
Watch the following screencast to get an overview of the Measures service:
To add criteria to the search query, click on More Criteria and select a criterion. As many criteria as you wish can be added.
Set the criteria and click on the Search button to display the results. Note that you can use the tab key to navigate through the criteria.
Types of component to search for: projects, views, files, developers, etc.
If the Components criterion is empty, only direct children will be displayed.
Filters components based on the last analysis date.
If checked, only components flagged as favorites will be displayed.
Filters components whose key contains a given string.
Drop-down list to select the languages to filter on.
Same as the Date criterion but a period has to be set instead of a date.
|Metric||Filters components to those where a specific measure is greater than or less than a certain threshold.|
Up to three "Metric" criteria can be defined.
Filters components whose name contains a given string.
|Quality Gate||Filter by quality gate status (Error | Warning | Ok). Was labelled Alert prior to SonarQube 4.3.|
Results Display Configuration
By clicking on Change Columns, display details can be configured: list of measures (value or variation), ordering of the columns, sort, etc.
Saving Search Query as Filter
To save a search query as a filter, click on the Save As link on the top right corner.
To create a shared filter, check the
- Bubble Chart (since SonarQube 4.2)
- Histogram (since SonarQube 4.2)
- Pie Chart (since SonarQube 4.2)
Measures Filter as List:
Measures Filter as Treemap:
Measures Filter as Bubble Chart:
Measures Filter as Pie Chart:
Measures Filter as Histogram:
Measures Filter as Cloud:
Once several filters have been created, it becomes necessary to manage them: edit, copy, delete, share, flag as favorite, etc. To do so, click on the left-hand side button in the search bar:
and click on Manage: