Dan Saunders
Dan Saunders

Reputation: 280

SonarQube shows technical debt added and removed but no changes to issues

Using SonarQube 5.1.2 we started with a fresh project, ran analysis twice with no source code changes between the first and second analysis. Then we selected 'changes since previous analysis'. The Issues and Technical debt widget shows Added: 24min and Removed: 24min but no actual issues (the issue counts against each severity are zero).

Drilling down on the added debt and opening a class shows 5 classes with debt that makes up the 24min but opening the source of a class only shows pre-existing issues. For instance, one class shows 4 minutes of added debt but opening the source shows only 2 pre-existing issues which add up to 20 minutes (8 minutes and 12 minutes). The supposedly changed files do have a blue bar on the left which spans the whole file and when you hover over it reads: 'New since previous analysis'.

In short, SonarQube is reporting technical debt changes that don't correlate to issues added or removed. Is this a bug with the widget?

Upvotes: 1

Views: 581

Answers (2)

Eddie
Eddie

Reputation: 1161

I ran into the same issue when running from a Jenkins job (sonarqube 5.1.2). I had the source code being analyzed in the repository itself. Once I moved the code out of the repository,

cp -r myrepo src/myrepo 

the bug seems to not appear. A work around if you do not want to display the issue.

Upvotes: 0

It looks like you are facing https://jira.sonarsource.com/browse/SONAR-7000.

Upvotes: 1

Related Questions