- ALM used: GitHub
- CI system used: Jenkins
- Languages of the repository: Java
Sonar scan configuration:
For some reason, sonar is analyzing (Pull request analysis), extra new code that was not made in this certain PR.
For example, there was a change made in Main.class(one line) and sonar is showing that there are 240 lines of new code.
Do anyone know what might be the reason?
You don’t want to put a commit hash here – but probably something closer to
I’ve changed this parameter to ghprbSourceBranch and still,
after I do PR with changes in two classes(a few lanes changed), Sonar is detecting 417 new lines of code in multiple classes.
Additionally, what I observed, PR analysis is showing new lines of code that were already merged to master 1/2 days ago. I’ve verified all parameters and everything is set correctly.
Do you have any idea what might be the reason?
Analysis was run using these properties:
Project scanner properties:
Sonar is showing the right PR, but the new lines are not matching with certain PR