用Delphi执行Sonar Runner失败了

时间:2017-06-29 00:22:12

标签: delphi sonarqube sonar-runner sonarqube-scan

这是项目根目录中的sonar-runner.properties文件。

sonar.projectKey=baedalpos
sonar.projectName=baedal
sonar.projectVersion=1.0
sonar.scm.provider=svn
sonar.language=delph
sonar.dynamicAnalysis=false
sonar.sourceEncoding=UTF-8
sonar.sources=/home/svntest/30.1.Client/.

如上所示,该项目是用Delphi编写的,所以我已经下载并安装了Delphi插件。当我运行sonar-runner命令时,它最终会留下以下错误消息。

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 10.024s
Final Memory: 55M/807M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
        at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
        at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.sonar.runner.Main.executeTask(Main.java:70)
        at org.sonar.runner.Main.execute(Main.java:59)
        at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalArgumentException: 737 is not a valid line for pointer. File [moduleKey=baedalpos, relative=Basic/uStoreTable.pas, basedir=/home/svntest/30.1.Client TEST] has 525 line(s)
        at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:148)
        at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:215)
        at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:209)
        at org.sonar.api.batch.fs.internal.DefaultInputFile.selectLine(DefaultInputFile.java:246)
        at org.sonar.batch.issue.DeprecatedIssueBuilderWrapper.line(DeprecatedIssueBuilderWrapper.java:59)
        at org.sonar.plugins.delphi.metrics.DeadCodeMetrics.save(DeadCodeMetrics.java:168)
        at org.sonar.plugins.delphi.DelphiSensor.processFiles(DelphiSensor.java:134)
        at org.sonar.plugins.delphi.DelphiSensor.analyse(DelphiSensor.java:112)
        at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
        at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
        at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
        at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
        at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47)
        at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106)
        at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:79)
        at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
        ... 9 more

0 个答案:

没有答案