我看不到SonarQube的分析结果

时间:2017-06-26 14:20:40

标签: 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.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

我该怎么做?

2 个答案:

答案 0 :(得分:3)

组合中我也一样:sonarqube 5.6.6 - C#6.0.0.2033 将C#插件降级到5.4.0.464并进行分析。我想使用最新版本:)

答案 1 :(得分:2)

我猜你使用的是声纳扫描器(没有MsBuild)。 从声纳-csharp-plugin的6.0版开始,它只支持 声纳的扫描仪的msbuild。

您应该迁移到MsBuild scaner或降级到5.X.X版本的插件。