xcov
xcov copied to clipboard
When `minimum_coverage_percentage` set to `100.0` xcov fails even when actual code coverage is `100.00%`
This seems to be an edge case but most of the code in my project is generated and the tests actually in fact do cover 100% of the code. But, when I set this parameter in fastlane, I get this error message:
[02:21:41]: Actual Code Coverage (100.00%) below threshold of 100.00%
[02:21:41]: The build has been marked as failed because minimum overall coverage has not been reached.
I'm pretty sure this is an edge case that just wasn't accounted for. In most cases 100% coverage is a red flag but in my particular case, it is true.
The corresponding part of my fastfile looks like this:
xcov(
is_swift_package: true,
output_directory: './fastlane/CodeCoverage',
minimum_coverage_percentage: 100.0
)
For now I think I'll just set it to 99.99% but that kind of causes me problems down the line. There's a lot of code and I think I could reach that threshold if just one of my tests don't pass in the future. for now I think mathematically I'm ok but I'm sure I won't be in maybe 2 years.
The project is here