MSBuild SonarQube Runner Resharper Plugin收到跳转信息错误
本文关键字:信息 错误 SonarQube Runner Resharper Plugin MSBuild | 更新日期: 2023-09-27 18:05:37
SonarQube - V 5.1.1
MSBuild SonarQube Runner - V 1.0
Resharper Plugin - V 2.0
Csharp Plugin - V 4.1
我正在运行以下命令:
- D:'SonarQube'sonarqube-5.1.1'MSBuild'MSBuild.SonarQube.Runner.exe begin /key:Test6MSBKey /name:Test6MSBProject /version:2.0
- msbuild Test6MSB.sln
- D:'SonarQube'sonarqube-5.1.1'MSBuild'MSBuild.SonarQube.Runner.exe end
我所有的resharper错误都被跳过,下面的问题被记录到命令窗口:
10:20:11 PM 22:20:11.013 INFO - Sensor org.sonar.plugins.resharper.CSharpReSharperProvider$CSharpReSharperSensor@1659dbf
10:20:11 PM 22:20:11.013 INFO - Parsing ReSharper report: D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB.xml
10:20:11 PM 22:20:11.054 INFO - Skipping the ReSharper issue at line 15 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Form1.cs" is not
in SonarQube.
10:20:11 PM 22:20:11.054 INFO - Skipping the ReSharper issue at line 16 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Form1.cs" is not
in SonarQube.
10:20:11 PM 22:20:11.054 INFO - Skipping the ReSharper issue at line 17 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Form1.cs" is not
in SonarQube.
10:20:11 PM 22:20:11.054 INFO - Skipping the ReSharper issue at line 18 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Form1.cs" is not
in SonarQube.
10:20:11 PM 22:20:11.054 INFO - Skipping the ReSharper issue at line 19 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Form1.cs" is not
in SonarQube.
10:20:11 PM 22:20:11.054 INFO - Skipping the ReSharper issue at line 20 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Form1.cs" is not
in SonarQube.
10:20:11 PM 22:20:11.054 INFO - Skipping the ReSharper issue at line 21 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Program.cs" is no
t in SonarQube.
10:20:11 PM 22:20:11.054 INFO - Skipping the ReSharper issue at line 22 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Program.cs" is no
t in SonarQube.
10:20:11 PM 22:20:11.055 INFO - Skipping the ReSharper issue at line 23 whose
file "D:'Chris'Schneider'Projects'SampleCode'Test6MSB'Test6MSB'Properties'Assemb
lyInfo.cs" is not in SonarQube.
10:20:11 PM 22:20:11.055 INFO - Sensor org.sonar.plugins.resharper.CSharpReSha
rperProvider$CSharpReSharperSensor@1659dbf (done) | time=42ms
我不知道为什么代码文件没有被放入SonarQube使用MSBuild运行器。在尝试使用MSBuild运行器之前,我能够成功地使用sonar-runner.bat(v2.4)在类似的解决方案上使用相同的Resharper插件和使用Resharper命令行inspectcode可执行文件创建的xml,并且Resharper问题成功地添加到sonarqube解决方案/项目中。
然而,我注意到c# 4.1插件的文档说sonar-runner的使用现在已被弃用,并使用MSBuildSonarQube Runner 1.0来分析c#项目,然而,当我尝试使用MSBuildSonarQube Runner时,我得到了如上所述的跳过错误。
这是由MSBuild SonarQube Runner 1.0版本中存在的测试项目检测机制中的错误引起的。它已在新版本1.0.1中修复,请参阅https://jira.sonarsource.com/browse/SONARMSBRU-121