Closed hosszubalazs closed 5 years ago
Hi @hosszubalazs , thanks for the report! I will take a look at it.
Do we know something about this issue? we are facing it frequently in our projects 💃
@daconstenla Can you check the raw json API response returned from Bitbucket?
(Should be doable in a browser).
/rest/api/1.0/projects/xxx/repos/xxx/pull-requests/xxx/diff?withComments=true
It seems the source
field of the hunk is after the destination
field. Feel free to clean up the JSON and post it here.
I'll try the version from the branch and I'll let you know, also I'll get a clean failing pull-request json string, thanks @t-8ch !
We have been running for one week without this issue using the mentioned version 👍 Thank you for the fix @t-8ch !
Will it be merged to master soon?
Done
Hey!
Environment: sonar-stash 1.4.0 SonarQube 6.7 LTS sonar.stash.include.existing.issues=true sonar.stash.include.vicinity.issues.range=4 // This is probably not interesting here
Issue: I get the following issue when doing PR analysis:
Invalid range: [162..136]
I have a lot of lines with each of them having issues(testing 1.4 of the plugin). The PR removes lines 132-165, and adds a new line on 132.
What I expect to happen is
I think the issue is thrown by Range, probably from this line:
return Range.closed(diff.getSource() - range, diff.getDestination() + range).contains(destination);
https://google.github.io/guava/releases/19.0/api/docs/com/google/common/collect/Range.html
My guess is removing code kills it, needs another check to make sure the left side of closed() is the smaller number.
What do you think? Cheers and thanks, Balázs