mibexsoftware / sonar-bitbucket-plugin

SonarQube plug-in to create pull request comments for found issues in Bitbucket Cloud
Other
122 stars 72 forks source link

Comments appearing on wrong line #64

Open David-Zeetta opened 6 years ago

David-Zeetta commented 6 years ago

I have configured Sonar to run against Pull Requests on our BitBucket and it is correctly identifying issues and adding comments. Great stuff! Unfortunately if lines have been moved, the comments show up in the wrong place....

Looks like what is happening is the "from" line number is being used as the "to" line number. For example, the comment below was put against "to" line 420, but the line was actually on that line before the diff, not after it, and has now moved to line 759.

one

two

Is this possibly a configuration problem on my end, or an actual issue? I've noticed that both the sonar.bitbucket.branchName and sonar.branch arguments are empty but I'd expect the plugin to be able to determine the source branch from the Pull Request anyway. I'm using the Bitbucket Pull Request Builder to trigger this job but the ${sourceBranch} value it is supposed to provide is not populated, so if this is the problem I'm not sure how to fix it.

Plug-in version, SonarQube version, CI system, build type

SonarQube Version: 6.6.0.32724 CI System: Jenkins Jenkins Sonar Plugin: 2.6.1

softqwarehung commented 6 years ago

I'm having the same issue, any plan for a fix soon?