Must-share information (formatted with Markdown):
- which versions are you using: Sonarqube on premise Version 9.9.2 (build 77730)
- how is SonarQube deployed: Docker Image
I have encountered an issue with Sonar, specifically related to the identification of code smells in new code changes. It appears that newcode smells are being reported in the “overall code” category, while they are not shown in the section newly added code.
In a recent branch, the only code change made was on line 85 of the file (shown below):
The problem is that code smells introduced in this branch’s new code are not being categorized as such. Instead, they are being only shown as the “overall code,” which could lead to misunderstandings and difficulties in identifying and addressing these issues.
The problematic branch was pushed directly with the changes to the VCS. Starting from the second build of the branch, all is fine.
We have defined new code as new code relative to the main branch.
I expect the code analysis tool to correctly recognize code smells introduced in new code changes within a branch and categorize them as “new code”.
I have reviewed the code changes made in this branch and confirmed that the only modification was on line 85. I expected the code smell to be associated with this new code change.