Hello,
We using SonarQube Data Center Edition Version 9.9
We intend to use the “Clean as You Code” strategy for PRs and would expect any code smells created by my new code to be displayed. Unfortunately, there are many examples of code smells not being displayed in the PR or the branch analysis under NewCode. This means that these code smells do not prevent the quality gate from failing.
The attached example shows that the change in line 220 leads to a code smell, which is displayed in line 208 (default case has been removed). An else-if was removed in line 250, which is then displayed in line 245. There are many other examples that make the new code look good but actually make the code worse.
In my opinion, the logic “Which code smells are displayed for the new code” should be improved here.
Currently, the “Clean as You Code” approach can only be used to a limited extent.
Are improvements planned here?