sonarQube Cannot resolve the file path 'X' from the Cobertura coverage report

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 10.2

  • how is SonarQube deployed: zip, Docker, Helm
    Windows service

  • what are you trying to achieve
    Use the new 10.2 feature to enable OpenCppCoverage / cobertura coverage to be included in SonarQube.

  • what have you tried so far to achieve this
    I have followed the example given windows-msbuild-opencppcoverage-gh-actions-sc/.github/workflows/build.yml at main · sonarsource-cfamily-examples/windows-msbuild-opencppcoverage-gh-actions-sc · GitHub.
    This has worked and the coverage is shown correctly within SonarQube however the warning Cannot resolve the file path ‘X’ from the Cobertura coverage report is generated once for every file in the cobertura report on for what appears to be for every file in the sonarqube analysis. This results in a very very long log file. I’m unsure of why the warning is displayed as the coverage is displayed correctly. Is there a way to resolve this ?

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hey there.

Do you mind attaching the full logs here where you get the warnings?

Hi @Colin

Would it be possible to share with you privately ?

Thanks,
Tom

It is possible, but isn’t this just the example repo?

Or have you modified it in order to suit an actual repo you’re working on?

Hi @Colin

Sorry having reread my initial post I’ve not been very clear. I have used the example you have used as an example and have it running on my own repo.

As I mentioned initially the coverage shows the correct values in the SonarQube GUI however there are around 60000 instances of the “Cannot resolve the file path ‘X’ from the Cobertura coverage report” warning message in the analysis.

Thanks. I’ve reached out privately so you can share logs.

Hello,

For the record, this issue is triggered by the Cobertura sensor being run once per module, instead of once for the full project. This is being tracked here

https://sonarsource.atlassian.net/browse/CPP-4693