c# - 看不到SonarQube的分析结果

标签 c# jenkins sonarqube sonarqube-scan

我在 jenkins 中使用 sonarqube。执行成功,但我没有看到任何报告或结果。一切都是0。

我认为问题出在这里,但我不确定。

16:01:05 16:01:05.380 WARN: This may lead to missing/broken features in SonarQube
16:01:05 16:01:05.380 INFO: Sensor SCM Sensor (wrapped) (done) | time=625ms
16:01:05 16:01:05.380 INFO: Sensor C# (wrapped)
16:01:05 16:01:05.396 INFO: Importing analysis results from C:\Jenkins\jobs\firecom_backend\workspace\null\output-cs
16:01:05 16:01:05.411 WARN: Protobuf file not found: null\output-cs\encoding.pb
16:01:05 16:01:05.427 WARN: Protobuf file not found: null\output-cs\metrics.pb
16:01:05 16:01:05.427 WARN: Protobuf file not found: null\output-cs\issues.pb
16:01:05 16:01:05.427 WARN: Protobuf file not found: null\output-cs\token-type.pb
16:01:05 16:01:05.442 WARN: Protobuf file not found: null\output-cs\symrefs.pb
16:01:05 16:01:05.442 WARN: Protobuf file not found: null\output-cs\token-cpd.pb
16:01:05 16:01:05.442 INFO: Sensor C# (wrapped) (done) | time=62ms
16:01:05 16:01:05.442 INFO: Sensor C# Unit Tests Coverage Report Import (wrapped)
16:01:05 16:01:05.442 DEBUG: No coverage property. Skip Sensor
16:01:05 16:01:05.442 INFO: Sensor C# Unit Tests Coverage Report Import (wrapped) (done) | time=0ms
16:01:05 16:01:05.442 INFO: Sensor C# Integration Tests Coverage Report Import (wrapped)
16:01:05 16:01:05.442 DEBUG: No coverage property. Skip Sensor
16:01:05 16:01:05.442 INFO: Sensor C# Integration Tests Coverage Report Import (wrapped) (done) | time=0ms
16:01:05 16:01:05.442 INFO: Sensor C# Unit Test Results Import (wrapped)
16:01:05 16:01:05.442 DEBUG: No unit test results property. Skip Sensor
16:01:05 16:01:05.442 INFO: Sensor C# Unit Test Results Import (wrapped) (done) | time=0ms
16:01:05 16:01:05.442 INFO: Sensor Zero Coverage Sensor (wrapped)
16:01:05 16:01:05.474 INFO: Sensor Zero Coverage Sensor (wrapped) (done) | time=32ms
16:01:05 16:01:05.474 INFO: Sensor Code Colorizer Sensor (wrapped)
16:01:05 16:01:05.505 INFO: Sensor Code Colorizer Sensor (wrapped) (done) | time=31ms
16:01:05 16:01:05.505 INFO: Sensor CPD Block Indexer (wrapped)
16:01:05 16:01:05.505 INFO: DefaultCpdBlockIndexer is used for cs
16:01:05 16:01:05.505 DEBUG: No CpdMapping for language cs
16:01:05 16:01:05.505 INFO: Sensor CPD Block Indexer (wrapped) (done) | time=0ms
16:01:05 16:01:05.505 INFO: Calculating CPD for 0 files
16:01:05 16:01:05.505 INFO: CPD calculation finished
16:01:08 16:01:08.692 INFO: Analysis report generated in 3094ms, dir size=276 KB
16:01:09 16:01:09.364 INFO: Analysis reports compressed in 672ms, zip size=150 KB
16:01:09 16:01:09.364 INFO: Analysis report generated in C:\Jenkins\jobs\firecom_backend\workspace\.scannerwork\batch-report
16:01:09 16:01:09.364 DEBUG: Upload report

有一个名为 null 的文件夹,也许这是问题所在,但我不知道如何解决。

我的 sonar.properties 是:

sonar.projectKey=mykey
sonar.projectName=myproject
sonar.projectVersion=1.0
sonar.sources=.
sonar.language=cs
sonar.sourceEncoding=UTF-8

sonar.analysis.mode        
sonar.verbose=true

更新:

我正在尝试降级 C# 的插件,但我找不到位置。

enter image description here

我该怎么做?

最佳答案

在组合中与我相同:sonarqube 5.6.6 - C# 6.0.0.2033 将 C# 插件降级到 5.4.0.464,分析工作正常。我想使用最新版本:)

关于c# - 看不到SonarQube的分析结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44761885/

相关文章:

c# - visual studio 不会将程序集复制到 gac

cloudbees 上的 jenkins 导致 android gradle 构建失败

jenkins - 在 Jenkins 上执行 Sonar 运行程序期间出现错误 500

c# - 如何使用自定义标识符启动进程/实例

c# - 如何解决 "Could not load file or assembly ' Microsoft.Practices.Prism'“错误?

c# - 未经授权的访问异常 : how to wait on input from user. Windows Phone c#

jenkins - 如何在Jenkins脚本化管道中设置环境变量?

Powershell 跳过数组中的元素,如果它为空

java - 对生成的代码运行 Lint/Sonarqube 分析

jenkins - 在 Jenkins 声明式管道中使用 waitForQualityGate