Search code examples
sonarqubesonar-runnersonarqube-scansonarqube5.1

How to display the TOP 10 occurred issues after analysis?


We would like to review our Sonar rules and the plan is to check weekly the TOP 10 occured issues after the analysis of our projects.

During the rule review we are planning to decide to remove/change/keep the rules.

Is there any way to create a list of the TOP 10 occured issues with Sonar?

We use SonarQube Version 5.6.3.


Solution

  • SonarQube native UI/API can report on most violated rules:

    • UI: Rule facet on the Issues page
    • WebAPI: the facets parameter of api/issues/search lets you get the same information

    As a side-note: deciding to 'remove/change/keep the rules' only based on number of occurrence seems quite shortsighted. A rule finding many coding convention issues (code smells), can't be compared to a rule detecting a severe vulnerability. The latter might fire only once a year, but you'll be thankful the vulnerability didn't make it in production.