Code coverage and scanning from different machines

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Exterprise latest
  • what are you trying to achieve
    I have code that compiles only on a mac machine (tool chain is XCode) and am using compile databases to achieve the source scanning.
    The unit tests run on a linux machine (for reasons) and they produce coverage.

How can I bring together the coverage and the source scanning together for one report.

  • what have you tried so far to achieve this
    I don’t know if it’s possible

Hi,

Welcome to the community!

To be explicit, I guess this is about analyzing Objective-C?

Theoretically, you could update the file paths in your Linux-generated coverage report to match the paths analysis will see on your Mac build agent. That should work.

 
HTH,
Ann

This is for C code.

So I’ll have to run the unit tests first, archive the coverage and then run the sonar-scanner on the mac build machine with the altered coverage file ?

I’ll give this a go and report back.

1 Like

Yes this worked nicely for our use case.

Thank you.

1 Like