Hello! I’m trying to finish the setup with my swift configuration, but I can’t get success with the code coverage report.
I can get the report file as described here
But after running sonar-scanner command. I can’t see the report over the webapp.
INFO: Parse coverage report (sonarqube-generic-coverage.xml)
let me know if you need something else to add to fix the issue.
Thanksl!
Lena
(Elena Vilchik)
July 30, 2019, 2:58pm
3
Hello @Alejandro_Arjonilla ,
Which property did you use to pass this coverage report?
Could you provide debug logs of analysis (run scanner with -X
option)?
Do you see in UI files for which you provided coverage?
Hello Elena, thanks for your response.
I’m passing with sonar.swift.coverage.reportPath=sonarqube-generic-coverage.xml
17:21:24.470 INFO: Parse coverage report (sonarqube-generic-coverage.xml)
17:21:24.596 INFO: Sensor SonarSwift [swift] (done) | time=35468ms
17:21:24.596 INFO: Sensor JaCoCo XML Report Importer [jacoco]
17:21:24.611 DEBUG: No reports found
17:21:24.611 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=15ms
17:21:24.611 INFO: Sensor JavaSecuritySensor [security]
17:21:24.611 INFO: Reading type hierarchy from: /Users/.../.scannerwork/ucfg2/java
17:21:24.612 INFO: Read 0 type definitions
17:21:24.615 INFO: Reading UCFGs from: /Users/.../.scannerwork/ucfg2/java
17:21:24.616 INFO: No UCFGs have been included for analysis.
17:21:24.616 INFO: Sensor JavaSecuritySensor [security] (done) | time=5ms
17:21:24.616 INFO: Sensor CSharpSecuritySensor [security]
17:21:24.616 INFO: Reading type hierarchy from: /Users/.../ucfg_cs2
17:21:24.616 INFO: Read 0 type definitions
17:21:24.616 INFO: Reading UCFGs from: /Users/.../ucfg_cs2
17:21:24.617 INFO: No UCFGs have been included for analysis.
17:21:24.617 INFO: Sensor CSharpSecuritySensor [security] (done) | time=1ms
17:21:24.617 INFO: Sensor PhpSecuritySensor [security]
17:21:24.617 INFO: Reading type hierarchy from: /Users/.../.scannerwork/ucfg2/php
17:21:24.617 INFO: Read 0 type definitions
17:21:24.617 INFO: Reading UCFGs from: /Users/.../.scannerwork/ucfg2/php
17:21:24.617 INFO: No UCFGs have been included for analysis.
17:21:24.617 INFO: Sensor PhpSecuritySensor [security] (done) | time=0ms
I can’t share the full log.
Lena
(Elena Vilchik)
July 31, 2019, 11:33am
5
You used swift-specific property, but provide generic report. For generic report use sonar.coverageReportPaths
(see docs )
To make coverage work as suggested here I had to use both:
sonar.coverageReportPaths
- to send xml report
AND
sonar.swift.coverage.reportPaths
- to workaround exception .