Sonarqube-generic-coverage.xml successfully generated but code coverage not shown

Hello Team,
I have integrated SonarCloud few month back into my iOS Project. Initially I used slather to generate the sonar cloud generic coverage report and send it to sonarcloud. This is working fine and code coverage is shown,

I use CircleCI to execute tests and sonar scanner.

My projects has 1 .xcworkspace and I want 2 projects whose code coverage I want to send to SonarCloud, I faced problem with slather to generate coverage for 2 sub *. xcodeproj projects thus using xccov-to-sonarqube-generic.sh script to generate generic code coverage from the projects.

Now In the below screenshot I am not seeing any code coverage.

Whereas on Circle Ci(logs added) show analysis is done successfully and reports are send.

SonarScanner Context: [Project Analysis]

SonarCloud plugins:
  - License for SonarLint 8.0.0.54573 (license)
  - Python Code Quality and Security 4.18.0.15334 (python)
  - XML Code Quality and Security 2.10.0.4108 (xml)
  - JaCoCo 1.3.0.1538 (jacoco)
  - IaC Code Quality and Security 1.30.0.10357 (iac)
  - Text Code Quality and Security 2.10.0.2188 (text)
Project server settings:
  - sonar.abap.file.suffixes=.abap,.ab4,.flow,.asprog
  - sonar.apex.file.suffixes=.cls,.trigger
  - sonar.autoscan.enabled=false
  - sonar.azureresourcemanager.file.suffixes=.bicep
  - sonar.c.file.suffixes=.c,.h
  - sonar.cpp.file.suffixes=.cc,.cpp,.cxx,.c++,.hh,.hpp,.hxx,.h++,.ipp
  - sonar.cs.file.suffixes=.cs,.razor
  - sonar.css.file.suffixes=.css,.less,.scss,.sass
  - sonar.docker.file.patterns=Dockerfile,*.dockerfile
  - sonar.flex.file.suffixes=as
  - sonar.go.file.suffixes=.go
  - sonar.html.file.suffixes=.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.cmp,.twig
  - sonar.java.file.suffixes=.java,.jav
  - sonar.java.springconfig.file.patterns=**/src/main/resources/**/application*.properties,**/src/main/resources/**/application*.yaml,**/src/main/resources/**/application*.yml
  - sonar.javascript.file.suffixes=.js,.jsx,.cjs,.mjs,.vue
  - sonar.json.file.suffixes=.json
  - sonar.jsp.file.suffixes=.jsp,.jspf,.jspx
  - sonar.kotlin.file.suffixes=.kt,.kts
  - sonar.objc.file.suffixes=.m
  - sonar.php.file.suffixes=php,php3,php4,php5,phtml,inc
  - sonar.pli.file.suffixes=.pli
  - sonar.plsql.file.suffixes=sql,tab,pkb
  - sonar.pullrequest.github.summary_comment=false
  - sonar.python.file.suffixes=py
  - sonar.rpg.file.suffixes=.rpg,.rpgle,.sqlrpgle,.RPG,.RPGLE,.SQLRPGLE
  - sonar.ruby.file.suffixes=.rb
  - sonar.scala.file.suffixes=.scala
  - sonar.swift.file.suffixes=.swift
  - sonar.terraform.file.suffixes=.tf
  - sonar.tsql.file.suffixes=.tsql
  - sonar.typescript.file.suffixes=.ts,.tsx,.cts,.mts
  - sonar.vb.file.suffixes=.bas,.frm,.ctl
  - sonar.vbnet.file.suffixes=.vb
  - sonar.xml.file.suffixes=.xml,.xsd,.xsl,.config
  - sonar.yaml.file.suffixes=.yaml,.yml
Project scanner properties:
  - sonar.c.file.suffixes=-
  - sonar.coverage.exclusions=iCxSvc/iCxSvc,SharedUI/SharedUI,Pickle/Pickle/Classes,
  - sonar.coverageReportPaths=sonarqube-generic-coverage-Carousell.xml,sonarqube-generic-coverage-Caramell.xml
  - sonar.cpp.file.suffixes=-
  - sonar.host.url=https://sonarcloud.io
  - sonar.objc.file.suffixes=-
  - sonar.organization=carousell
  - sonar.projectBaseDir=/Users/distiller/project
  - sonar.projectKey=carousell_Carousell-iOS
  - sonar.scanner.app=ScannerCLI
  - sonar.scanner.appVersion=5.0.1.3006
  - sonar.sourceEncoding=US-ASCII
  - sonar.sources=Snapsell/Feature,Snapsell/Core,Snapsell/Classes,Liquore/Liquore/Utilities,Liquore/Liquore/Networking,Liquore/Liquore/Models,Liquore/Liquore/Core,Liquore/Liquore/Consistency,Liquore/Liquore/API,iCxSvc/iCxSvc,SharedUI/SharedUI,Pickle/Pickle/Classes,Caramell/Caramell/Classes
  - sonar.swift.swiftLint.reportPaths=swift-lint.json
  - sonar.tests=CarousellTests,Liquore/Tests,Caramell/CaramellTests
  - sonar.working.directory=/Users/distiller/project/.scannerwork

When I run the same project locally, I am able to see updated code coverage that means both coverage reports are included.

SonarScanner Context: [Project Analysis]

SonarCloud plugins:
  - License for SonarLint 8.0.0.54573 (license)
  - Python Code Quality and Security 4.18.0.15334 (python)
  - XML Code Quality and Security 2.10.0.4108 (xml)
  - JaCoCo 1.3.0.1538 (jacoco)
  - IaC Code Quality and Security 1.30.0.10357 (iac)
  - Text Code Quality and Security 2.10.0.2188 (text)
Project server settings:
  - sonar.abap.file.suffixes=.abap,.ab4,.flow,.asprog
  - sonar.apex.file.suffixes=.cls,.trigger
  - sonar.autoscan.enabled=false
  - sonar.azureresourcemanager.file.suffixes=.bicep
  - sonar.c.file.suffixes=.c,.h
  - sonar.cpp.file.suffixes=.cc,.cpp,.cxx,.c++,.hh,.hpp,.hxx,.h++,.ipp
  - sonar.cs.file.suffixes=.cs,.razor
  - sonar.css.file.suffixes=.css,.less,.scss,.sass
  - sonar.docker.file.patterns=Dockerfile,*.dockerfile
  - sonar.flex.file.suffixes=as
  - sonar.go.file.suffixes=.go
  - sonar.html.file.suffixes=.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.cmp,.twig
  - sonar.java.file.suffixes=.java,.jav
  - sonar.java.springconfig.file.patterns=**/src/main/resources/**/application*.properties,**/src/main/resources/**/application*.yaml,**/src/main/resources/**/application*.yml
  - sonar.javascript.file.suffixes=.js,.jsx,.cjs,.mjs,.vue
  - sonar.json.file.suffixes=.json
  - sonar.jsp.file.suffixes=.jsp,.jspf,.jspx
  - sonar.kotlin.file.suffixes=.kt,.kts
  - sonar.objc.file.suffixes=.m
  - sonar.php.file.suffixes=php,php3,php4,php5,phtml,inc
  - sonar.pli.file.suffixes=.pli
  - sonar.plsql.file.suffixes=sql,tab,pkb
  - sonar.pullrequest.github.summary_comment=false
  - sonar.python.file.suffixes=py
  - sonar.rpg.file.suffixes=.rpg,.rpgle,.sqlrpgle,.RPG,.RPGLE,.SQLRPGLE
  - sonar.ruby.file.suffixes=.rb
  - sonar.scala.file.suffixes=.scala
  - sonar.swift.file.suffixes=.swift
  - sonar.terraform.file.suffixes=.tf
  - sonar.tsql.file.suffixes=.tsql
  - sonar.typescript.file.suffixes=.ts,.tsx,.cts,.mts
  - sonar.vb.file.suffixes=.bas,.frm,.ctl
  - sonar.vbnet.file.suffixes=.vb
  - sonar.xml.file.suffixes=.xml,.xsd,.xsl,.config
  - sonar.yaml.file.suffixes=.yaml,.yml
Project scanner properties:
  - sonar.c.file.suffixes=-
  - sonar.coverage.exclusions=iCxSvc/iCxSvc,SharedUI/SharedUI,Pickle/Pickle/Classes,
  - sonar.coverageReportPaths=sonarqube-generic-coverage-Carousell.xml,sonarqube-generic-coverage-Caramell.xml
  - sonar.cpp.file.suffixes=-
  - sonar.host.url=https://sonarcloud.io
  - sonar.objc.file.suffixes=-
  - sonar.organization=carousell
  - sonar.projectBaseDir=/Users/shubhendushukla/Documents/Carousell/Carousell-iOS
  - sonar.projectKey=carousell_Carousell-iOS
  - sonar.scanner.app=ScannerCLI
  - sonar.scanner.appVersion=5.0.1.3006
  - sonar.sourceEncoding=UTF-8
  - sonar.sources=Snapsell/Feature,Snapsell/Core,Snapsell/Classes,Liquore/Liquore/Utilities,Liquore/Liquore/Networking,Liquore/Liquore/Models,Liquore/Liquore/Core,Liquore/Liquore/Consistency,Liquore/Liquore/API,iCxSvc/iCxSvc,SharedUI/SharedUI,Pickle/Pickle/Classes,Caramell/Caramell/Classes
  - sonar.swift.swiftLint.reportPaths=swift-lint.json
  - sonar.tests=CarousellTests,Liquore/Tests,Caramell/CaramellTests
  - sonar.verbose=true
  - sonar.working.directory=/Users/shubhendushukla/Documents/Carousell/Carousell-iOS/.scannerwork

When I run this locally, I see below on sonarCloud web page.

Hey there.

I think you’re facing a bug that was reported last month:

It only affects PRs with no lines of code that can be covered by tests, like the one you shared.

A fix is scheduled for an upcoming hardening sprint.

1 Like

Any update on when the bug will be fixed?

It’s still scheduled for the end of this month. Thanks for your patience.

Hey @shubhendu-shukla

Happy to let you know the issue has been fixed.