New Bugs shows 1, but actually 4 bugs when compared to first scan

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube Version 7.9.3 (build 33349)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
    We use sonar scanner to scan source code, we found that in the first scan, there are 97 bugs, and found 101 bugs in seconds scan. However, only 1 New Bugs are shown in overview. We use previous_version as new code period.
  • steps to reproduce
    Scan first source code with git tag v1.0.0, found 97 bugs
    Scan seconds source code with master branch, found 101 bugs
    However, only 1 New Bugs are shown in overview.
  • Screenshot


P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Hi,

What happened between your two analyses? It looks like all your issue counts, not just bugs, increased with the second analysis. Did you upgrade an analyzer in between? If so, that would very likely have resulted in new issues being found on old code. In such cases, those issues on old code are backdated, which is why your overall counts could increase without the additional issues showing up “on New Code”.

The other option is that in the second analysis you added an external issues report (see the docs I linked above). Those issues are always backdated.

 
HTH,
Ann