Code coverage for swift Xcode 11

Hi, all!

I’m curious to know the reason SonarQube documentation states to use the script to convert coverage data to sonar generic type for swift project on Xcode 11. I just tried to submit .llcov report and it seems to work just fine. The reason I’m asking is that I have Objective-C file in the project as well and sonar-scanner was quite unhappy with that with the following line: Caused by: Line 32930 of report refers to a file with an unknown language:. Is there a way to fix it? Not being sure what it could be connected with leaves me with no other options rather than looking for a way to expclude .m files, but I could not find such an option.

As I said earlier, also curios, if I can continue to use llcov report, which seems to work just fine (am I missing something? Would some functionality not work because of that?).

I am using:

  • SonarQube Scanner
  • Xcode 11.3.1

I was able to fix it by adding .m to exclusions list, but surprisingly (or not surprisingly) got same results using two different reports: generated by slather (llvcov) and generated by script provided by Sonar using command in the example.

A post was split to a new topic: Swift Coverage report generation fails

Hi @wise_Kaa

Thank you for your message, but it’s not clear to me what’s exactly your question or problem (there are too many in your initial message). Next time please spend some time clarifying that for yourself so that others could help you.

As far as I understood you have a project with both Swift and Obj-C code.

Could you share full logs and describe which analysis properties you use to import coverage?