Sonar SonarQube collects a maximum of measures in an automated manner but there are some measures for which this is sometimes not possible, such as when: the information is not available for collection, the measure is computed by a human, etcand so on. Whatever the reason, Sonar SonarQube provides a service to inject those measures manually and allow you to benefit from other services (Dashboard, TimeMachine, etc.): the Manual Measures service. The so-entered metrics are going to manual metrics entered will be picked during the next analysis of the project and be converted to thereafter treated as "normal" measures.
This functionality has been greatly improved in Sonar 2.10.
Managing Manual Metrics
As for automated collected measures, a manual measure is collected on metric. The with measures that are collected automatically, manual measures are collected on metrics. Therefore, the first thing is therefore to create the metric you want to save your measure against. In order to do so, sign in to Sonar, click on configuration at the top right of the page and choose Manual Metrics entry in the left menu:
As soon as it is created, a new metric will be available to enter manual measures.
log in as a SonarQube administrator and go to Settings > Manual Measures:
Managing Manual Measures
Manual measures can be entered at any level of the project, i.e. project, module or package. To add a measure, sign in and as a project administrator, go to the dashboard of the desired component and enter the choose Configuration > Manual Measures left menu entry. You are presented with a table containing the latest measure entered for each metric:
The orange marker means that no analysis has been run since the manual measure has been was entered, and therefore it will not appear on the resourcecomponent.
From there, you have the ability to edit or delete an existing measure or enter a new one: