cococo is a command line tool to convert Xcode 11's code coverage data to SonarQube's generic code coverage format. It is written in Swift and makes use of multiple threads to speed up the computation.
USAGE: cococo <xcresult> [-e <excluded-file-extension1> ...]
OPTIONS:
--excluded, -e Multiple file extensions which are excluded from processing
--help Display available options
Run the tool for a given xcresult
archive, exclude .h
and .m
files from processing and save the result to sonarqube-generic-coverage.xml
.
cococo myproject.xcresult --excluded .h .m > sonarqube-generic-coverage.xml
The Xcode 11's xcresult
archive can be found in the derived data folder:
DerivedData/YourProject/Logs/Test/*.xcresult
You can download the latest release from here.