gpt4 book ai didi

svn - Sonar 单片机故障 1 行无故障数据

转载 作者:行者123 更新时间:2023-12-04 15:57:05 25 4
gpt4 key购买 nike

我在 Windows 7 机器上使用 SVN 执行 Sonar 分析(Sonar Runner v2.4 和 SonarQube 5.0)时遇到了一些问题。

我收到以下错误:

java.lang.IllegalStateException:无法归咎于文件 DataTypes/TtCallPackagePlanType.cs。第 1 行没有责备信息。文件提交了吗?

当我使用 -X 标志执行 sonar-runner 时,它告诉我 sonar 正在执行这个责备命令:

svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallPackagePlanType.cs

但是当我自己在同一位置的命令提示符中运行该命令时,我会得到一个完整的 XML 文件,您可以在此链接中看到:

http://pastebin.com/U2TjxLTs

SVN 版本是 1.8.10,我在执行 sonar-runner 之前在完整目录上运行了 svn upgrade

我不明白 SVN 插件对责任数据有什么问题。

我无法附上完整的日志,因为它对于网站(和 pastebin)来说太大了,但这里是(我认为是)相关行:

01:18:49.335 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallDirection.cs
01:18:49.381 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallOrigin.cs
01:18:49.413 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallOutcome.cs
01:18:49.803 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallPackagePlanType.cs
01:18:49.912 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallReason.cs
01:18:49.959 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallRecordOutcome.cs
01:18:49.974 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallRecordValidity.cs
01:18:50.068 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCallValidity.cs
01:18:50.463 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtChargeEnquiryReportDataType.cs
01:18:50.494 DEBUG - Release semaphore on project : org.sonar.api.resources.Project@1b4cf3[id=1,key=icharge:latest,qualifier=TRK], with key batch-sonar:test
01:18:50.512 DEBUG - Executing: svn blame --xml --non-interactive -x -w --username ******** --password ******** --trust-server-cert DataTypes/TtCheckOutNumberDetails.cs
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 35.833s
Final Memory: 22M/115M
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.IllegalStateException: Unable to blame file DataTypes/TtCallPackagePlanType.cs. No blame info at line 1. Is file commited?
at org.sonar.plugins.scm.svn.SvnBlameConsumer.consumeLine(SvnBlameConsumer.java:135)
at org.sonar.api.utils.command.CommandExecutor$StreamGobbler.consumeLine(CommandExecutor.java:191)
at org.sonar.api.utils.command.CommandExecutor$StreamGobbler.run(CommandExecutor.java:177)

链接到 sonar-project.properties: http://pastebin.com/xnFyPz67

链接到 sonar.properties: http://pastebin.com/q6TaGZQG

最佳答案

我也遇到过类似的问题:

ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to blame file <path_to_the_file>
...
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Missing commit <sha1_of_commit>

在我的情况下,这是由于浅克隆。我将 jenkins 作业设置为始终检查深度 = 1 的分支(以赢得时间)。

关于svn - Sonar 单片机故障 1 行无故障数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28412122/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com