【问题标题】:File does not exist in SonarQube analysisSonarQube 分析中不存在文件
【发布时间】:2018-08-31 18:08:50
【问题描述】:

使用 TFS 2015 vNext 构建分析 C# 项目时,我收到以下错误:

文件夹 'D:\Builds_Agent1_work\4\s\System\IPS\Files\Logo\MasterDesigns\Logo_11_Seal_of_Pinellas_County' 不存在 'DEV_ScriptAdvisorPBM_SonarQube:DEV_ScriptAdvisorPBM_SonarQube:9C5E1BB5-E446-​​45C8-9CE6-5F9896D0D063' (基本目录 = D:\Builds_Agent1_work\4\s\System\IPS)

我认为这是因为有一个名为“Logo_11_Seal_of_Pinellas_County,_Florida.png”的文件,但 SonarQube 认为它是“Logo_11_Seal_of_Pinellas_County”。

我尝试/d:sonar.exclusions=**\MasterDesigns\* 忽略“Logo_11_Seal_of_Pinellas_County,_Florida.png”所在的整个目录,但仍然是同样的错误。

有解决此问题的建议吗?谢谢。

SonarQube 6.5 C# 插件。

【问题讨论】:

  • 你能在你的构建服务器中找到文件夹D:\Builds_Agent1_work\4\s\System\IPS\Files\Logo\MasterDesigns\Logo_11_Seal_of_Pinellas_County 吗?您能否分享整个构建定义设置?尤其是与 SonarQube 相关的任务?
  • D:\Builds_Agent1_work\4\s\System\IPS\Files\Logo\MasterDesigns\Logo_11_Seal_of_Pinellas_County 文件不存在。我认为这是因为它应该正确查找 D:\Builds_Agent1_work\4\s\System\IPS\Files\Logo\MasterDesigns\Logo_11_Seal_of_Pinellas_County,_Florida.png 但由于文件名中的“,”逗号字符,它错误地尝试查找其他文件

标签: tfs sonarqube sonar-runner


【解决方案1】:

此错误由 SONARMSBRU-199 跟踪,已在 Scanner for MSBuild v4.1 中修复。

错误报告提到了排除单个文件的解决方法。

在 Scanner for MSBuild v4 中删除了对 MSBuild 12 的仅供参考,因此如果您升级版本,则需要确保您使用的是兼容版本的 MSBuild。

【讨论】:

  • 感谢 duncanp 的快速响应。该链接正是我们遇到的问题。不幸的是,我们仍在使用 TFS 2015 Update 3,它具有旧版本的“SonarQube Scanner for MSBuild”vNext 任务,它使用旧版本的 SQ Scanner。我可能只是复制任务以使用更新的 SQ SCanner 创建一个全新的任务来修复它。同时,我将尝试使用 标签的解决方法。
猜你喜欢
  • 2021-05-13
  • 2015-03-20
  • 1970-01-01
  • 2018-04-16
  • 2016-01-26
  • 1970-01-01
  • 2018-09-23
  • 2017-04-30
  • 2018-06-29
相关资源
最近更新 更多