1

我正在使用带有 tfvc 插件 2.1 和 TFS 2015 Update 1 的 SonarQube 5.3。

我在 Sonar.properties 中的参数是:

sonar.scm.enabled=true
sonar.scm.provider=tfvc
sonar.tfvc.username=*xxx*
sonar.tfvc.password.secured=*yyy*
sonar.tfvc.collectionuri=*http://mytfs:8080/tfs/mycollection*

当我在 TFS vNext 构建(它与 XAML 构建一起使用)中使用内置声纳任务时,SCM 提供程序似乎不起作用。我在日志中收到以下错误:

09:04:05.653 INFO  - SCM provider for this project is: tfvc
09:04:05.653 INFO  - 4 files to be analyzed
09:04:05.653 DEBUG - Executing the TFVC annotate command: D:\Builds\Agent1\_work\b33ed2ba\.sonarqube\out\.sonar\.sonartmp\SonarTfsAnnotate1596861656643555411.exe
09:04:05.762 DEBUG - TFS annotating: D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/CalcTest.AddNumbersTest.g.cs
09:04:05.778 INFO  - Unable to TFS annotate the following file which is not in a mapped TFS workspace: D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/CalcTest.AddNumbersTest.g.cs
09:04:05.778 DEBUG - TFS annotating: D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/CalcTest.cs
09:04:05.793 INFO  - Unable to TFS annotate the following file which is not in a mapped TFS workspace: D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/CalcTest.cs
09:04:05.793 DEBUG - TFS annotating: D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/Properties/AssemblyInfo.cs
09:04:05.793 INFO  - Unable to TFS annotate the following file which is not in a mapped TFS workspace: D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/Properties/AssemblyInfo.cs
09:04:05.793 DEBUG - TFS annotating: D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/Properties/PexAssemblyInfo.cs
09:04:05.793 INFO  - Unable to TFS annotate the following file which is not in a mapped TFS workspace: D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/Properties/PexAssemblyInfo.cs
09:04:05.793 INFO  - 0/4 files analyzed
09:04:05.793 WARN  - Missing blame information for the following files:
09:04:05.793 WARN  -   * D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/Properties/PexAssemblyInfo.cs
09:04:05.793 WARN  -   * D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/CalcTest.AddNumbersTest.g.cs
09:04:05.793 WARN  -   * D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/CalcTest.cs
09:04:05.793 WARN  -   * D:/Builds/Agent1/_work/b33ed2ba/s/WindowsFormsApplication2.Tests01/Properties/AssemblyInfo.cs
09:04:05.793 WARN  - This may lead to missing/broken features in SonarQube

有什么建议么?

4

2 回答 2

1

我比较了 XAML 构建的 SonarQube.Analysis 信息,发现我有不同的 sonar.tfvc.username 帐户。XAML 使用了 TFS 构建帐户,当我将它用于 vNext 构建时,它可以工作。

于 2016-02-24T11:29:29.970 回答
0

检查这种情况并尝试那里的解决方法,看看它是否有帮助:“最后我需要在创建工作区后进行提交并下载代码以使插件工作。如果提交是由第三方代理进行的,则插件不会”也不行。”

于 2016-02-16T08:34:16.733 回答