It really feels like SonarQube doesn’t provide any usable solution to properly forward Xcode Cloud data to SonarQube. There are some ugly solutions like running tests in postbuild script, but this is horrible. So what does developer expect to be able to do:
- Xcode Cloud should execute tests using Test action
- Test action generates coverage report
- This report is being sent somewhere to SQ to handle it
This somewhere maybe specialized endpoint for attaching coverage report to existing analysis or it may be some github action that replaces build.yml (which is executed before code coverage is gathered). That’s it. DEveloper should not execute additional ghost builds for gathering coverage for the scanner, because it’s comfortable for SQ, developer should not decline using proper actions and gather handy test reports in order to gather reports “the way SQ would support it”, developer should not waste money for running additional builds/tests runs, they all are already done in the pipeline and it’s SQ’s part to get them and properly process.
Yes, I see a possibility to use test action postbuild action to “just” execute analysis on the cloud and then send the analysis to SQ, but… Why SonarQube doesn’t just have 100% working guide on this? Like “do this and this and you’ll have your code coverage” why developers should struggle with it, putting crutches everywhere.
Once again - SQ should be just a natural addition to existing CI/CD pipeline, without turning it into Frankenstein’s monster, the guideline should be accessible and cover all possible issues that users may have while the implementation.
Xcode Cloud exists for 3 years, SQ - longer, I got no clue why for those 3 years SQ didn’t do anything to provide proper solution for pretty typical task - gather coverage for one the most popular CI/CD platform for iOS/Mac developers. It really feels like they don’t care.