Hi Team,
We are observing unexpected behavior in SonarQube after running multiple branch analyses.
Scenario:
-
On Feb 12, the master branch had 131 issues, and the build passed successfully.
-
Over the next 15 days:
-
Multiple developers worked on different feature branches
-
Several branch scans were executed
-
-
Recently, we triggered a scan on the master branch with only a few changes
Issue:
-
The issue count increased to ~200 issues
-
Many of these new issues are reported in files that were last modified 3 years ago
-
These files were not part of recent changes
Questions:
-
Why is SonarQube reporting new issues in very old, unchanged files?
-
Does SonarQube re-analyze the entire codebase on each master scan?
-
Could this be caused by:
-
Quality Profile changes?
-
Rule updates or plugin upgrades?
-
New Code Period configuration?
-
-
How can we ensure that only new/changed code impacts the Quality Gate?
Environment details:
-
SonarQube version: Community Edition Version 10.4.1 (build 88267)
-
Scanner: Jenkins
-
Branch strategy: multiple feature branches merged into master
Any guidance would be appreciated.