Branch analysis bringing existing issues as New

SonarQube 7.9.1 LTS Enterprise

I am facing issues with branch analysis. There are two branches - master and dev.
master was created by default at the start of project and after first complete scan, dev branch was created and upon creation of dev branch all existing issues from master branch were synced to dev branch (as expected).

Master branch first analysis:

Dev branch first analysis (after master):

Both branches were working fine, when suddenly dev branch started showing existing issues (which existed in master branch since day one already) as NEW and failing the Quality Gate.

Existing issues in master branch:

Same issues reported as new in dev branch (note that this did not happen for 4 months since this branch was created and multiple scans were run, but it suddenly started showing them as NEW yesterday).

And this of course, failed the Quality Gate on dev branch.

Can someone explain what’s going on ?


Your issue selection is narrowed to show only bugs. Do multiple issues exist on the lines in question? If so, this bug fixed in 7.9.2 is probably relevant, and an upgrade (to 7.9.4 :smiley:) would fix it for you: SONAR-12449


No, those 3 lines only have 1 bug each.


To be clear: one bug each or one issue - of any type - each? Sorry to be pedantic, but it could make a difference.


One issue of any type. As you can see from screenshot there is no filter applied. Previous lines have code smells but the lines 996, 999, 1002 only have bugs.

Were those 3 issues present in the previous analysis of the branch?
If they were introduced into the branch as some point, it’s expected that they’ll show up as new. The fact that they exist in master doesn’t matter. The branch ‘inherits’ all issues from master in its first analysis, what happens from then on is independent from master.

Found the reason for this and created a new issue here.

The issues were always there in master branch and when develop branch was created, those issues were copied over. Later develop branch reported a parsing error due to code changes made in that file and because of parse error, SonarQube closed all existing issues from that file in develop branch. Later when the parsing error was fixed, those issues were reported as New.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.