There is a hard requirement for an Xcode project with slather.
Swift packages can generate their code coverage from a command-line build using swift test --enable-code-coverage
with the results written to the .build/debug/codecov folder.
That folder contains three files:
- PackageName.json
- default.profdata
- default_build_ID_.profraw
The information can be parsed from the json file easily enough, and converted to the desired output format.