简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM