Old lines detected as new code

Currently, I am facing the same problem with SonarQube 9.9.1. I doubt that the issue is related to versions, as several people here (and in other issues, for example) have pointed out the same problem.

What I have noticed is that “code smells,” which are unrelated to my PR changes, arise in files that differ from the current branch and a target PR branch. Performing a git rebase origin/ fixes the issue for me.

P.S. I also found a problem and a solution in this issue, jenkins builds.

1 Like