Open marvin-bitterlich opened 8 years ago
In order to reproduce this issue, the diff for this pull request would be very helpful.
First, please execute this cURL statement:
curl -v -u YOUR_BITBUCKET_USER https://api.bitbucket.org/2.0/repositories/YOUR_USER_NAME/REPO_SLUG/pullrequests/PULL_REQUEST_ID/diff
then copy the URL from the Location Header field in the HTTP response (LOCATION_URL below) and use that with the appended “?context=0” parameter for the second cURL:
curl -u YOUR_BITBUCKET_USER LOCATION_URL?context=0
The output of this second cURL statement would be the one of interest. Thanks in advance!
It is a bit big ;) report.txt
Could you please retry with the latest release 1.0.8 https://github.com/mibexsoftware/sonar-bitbucket-plugin/releases/latest ?
Build goes through, works fine :)
Perfect, thanks for your feedback!
Hi. Looks like i got the same error: "[sonar4bitbucket] Failed to parse diff: diff --git ' expected but
d' found". Using version 1.1.7 of plugin.
Hi @initx,
To be able to reproduce this issue, I need the Git diff of this pull request.
First, please execute this cURL statement:
curl -v -u YOUR_BITBUCKET_USER https://api.bitbucket.org/2.0/repositories/YOUR_USER_NAME/REPO_SLUG/pullrequests/PULL_REQUEST_ID/diff
then copy the URL from the Location Header field in the HTTP response (LOCATION_URL below) and use that with the appended “?context=0” parameter for the second cURL:
curl -u YOUR_BITBUCKET_USER LOCATION_URL?context=0
The output of this second cURL statement would be the one of interest. Thanks in advance!
Hi again. Here is the curl response: diff-output.txt May the problem is mercurial vcs that i am using?
Thanks for the diff. Indeed, the problem is that our diff parser only supports Git and not Mercurial. I wonder if the Bitbucket REST API allows me to specify that I always want the diff in Git's unified format (Mercurial basically supports this AFAIK).
Should I just keep waiting for response from You or this ticket need to be closed (no HG support)?
I'm interested in the resolution of this issue, to use this amazing plugin with Bitbucket and Mercurial.
Thanks!
@initx @joan-miralles Please excuse my late response. We will try to support Mercurial. I now have time to work on this. I'll keep you informed.
or 01-Feb-2016 11:05:42 11:05:42.121 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.RuntimeException: [sonar4bitbucket] Failed to parse git diff:
index ' expected butd' found error 01-Feb-2016 11:05:42 11:05:42.121 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.diff.IssuesOnChangedLinesFilter.parseOrFail(IssuesOnChangedLinesFilter.scala:48) error 01-Feb-2016 11:05:42 11:05:42.122 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.diff.IssuesOnChangedLinesFilter.filter(IssuesOnChangedLinesFilter.scala:19) error 01-Feb-2016 11:05:42 11:05:42.122 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.review.ReviewCommentsCreator.processIssues(ReviewCommentsCreator.scala:76) error 01-Feb-2016 11:05:42 11:05:42.122 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.review.ReviewCommentsCreator.createOrUpdateComments(ReviewCommentsCreator.scala:30) error 01-Feb-2016 11:05:42 11:05:42.122 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob$$anonfun$executeOn$1.apply(SonarReviewPostJob.scala:21) error 01-Feb-2016 11:05:42 11:05:42.122 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob$$anonfun$executeOn$1.apply(SonarReviewPostJob.scala:18) error 01-Feb-2016 11:05:42 11:05:42.122 [ERROR] [org.gradle.BuildExceptionReporter] at scala.collection.immutable.List.foreach(List.scala:381) error 01-Feb-2016 11:05:42 11:05:42.125 [ERROR] [org.gradle.BuildExceptionReporter] at ch.mibex.bitbucket.sonar.review.SonarReviewPostJob.executeOn(SonarReviewPostJob.scala:18) error 01-Feb-2016 11:05:42 11:05:42.125 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:65) error 01-Feb-2016 11:05:42 11:05:42.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55) error 01-Feb-2016 11:05:42 11:05:42.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:107) error 01-Feb-2016 11:05:42 11:05:42.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:185) error 01-Feb-2016 11:05:42 11:05:42.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132) error 01-Feb-2016 11:05:42 11:05:42.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117) error 01-Feb-2016 11:05:42 11:05:42.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:243) error 01-Feb-2016 11:05:42 11:05:42.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:238) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:228) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122) error 01-Feb-2016 11:05:42 11:05:42.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at com.sun.proxy.$Proxy57.execute(Unknown Source) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:84) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568) error 01-Feb-2016 11:05:42 11:05:42.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) error 01-Feb-2016 11:05:42 11:05:42.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)