文件移动后的SonarQube分析任务错误

时间:2016-10-14 07:27:18

标签: c# sonarqube sonarqube-scan

我们一直在C#项目上使用SonarQube分析,作为TFS 2015/15 RC2 vNext版本的一部分,适用于一直运行良好的年龄。

几天后我重构了代码的几个方面,这包括将文件移动到同一项目中的新文件夹中,而不是类名更改等.Visual Studio没有正确处理这个问题而且我不得不单独删除并重新添加一些文件到项目中。

我们的分析现在失败了,在查看分析任务的日志时,我可以看到以下错误:

ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVe_-iOpE8SSKScA9O_3 java.lang.IllegalStateException:
  Original file OriginalFile{id=1363, uuid='ca50dc09-5d0b-4083-9e52-eb0f66361422', key='MIS:MIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/XXX/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs'}
  already registered for file
  ComponentImpl{key='StanMIS:StanMIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/Smp/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs', type=FILE, uuid='AVe_-nQKU1hbfyCkniEZ', name='', description='null', fileAttributes=FileAttributes{languageKey='cs', unitTest=false},
  reportAttributes=ReportAttributes{ref=1506, version='null',
  path='Models/Smp/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs'}}.
  Unable to register OriginalFile{id=1353, uuid='1488ce7d-094c-4859-9e23-adae0f1ac2a3', key='StanMIS:StanMIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/XXX/Grids/DStanContacts/SmpDStanContactFilterModel.cs'}.
    at com.google.common.base.Preconditions.checkState(Preconditions.java:197) ~[guava-18.0.jar:na]
    at org.sonar.server.computation.filemove.MutableMovedFilesRepositoryImpl.setOriginalFile(MutableMovedFilesRepositoryImpl.java:41) ~[sonar-server-6.0.jar:na]
    at org.sonar.server.computation.filemove.FileMoveDetectionStep.registerMatches(FileMoveDetectionStep.java:144) ~[sonar-server-6.0.jar:na]
    at org.sonar.server.computation.filemove.FileMoveDetectionStep.execute(FileMoveDetectionStep.java:139) ~[sonar-server-6.0.jar:na]
    at org.sonar.server.computation.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64) ~[sonar-server-6.0.jar:na]
    at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52) ~[sonar-server-6.0.jar:na]
    at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:75) ~[sonar-server-6.0.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:81) ~[sonar-server-6.0.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:56) ~[sonar-server-6.0.jar:na]
    at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35) [sonar-server-6.0.jar:na]
    at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_45]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_45]
ERROR [o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=MIS | type=REPORT | id=AVe_-iOpE8SSKScA9O_3 | submitter=XXX | time=24633ms

1 个答案:

答案 0 :(得分:2)

你面对https://jira.sonarsource.com/browse/SONAR-8013。它在版本6.1中修复。