Closed hborawski closed 3 years ago
Updated the code to use snake case for all the variables, didn't even realize the rest of the codebase was snake 🤦
Merged, thanks for the contribution! I'll make a release to include this.
Happy to help, and excited to get all my projects updated with this!
Using the lcov json data segments, populate
branch_coverage_data
for profdata coverage filesThis allows the cobertura report to correctly calculate branch coverage
Also added branch coverage to the HTML output by using the segments to determine column ranges that were not hit, so null coalesecing operations, or other single line branches can be determined as missed coverage.
Please let me know if there are any updates required for this PR, it's been quite some time since using ruby, so I'm sure the code can be improved.
I made sure the existing tests pass, and i added some small profdata tests to check that the branch data populates as expected.
I've also tested this locally against a real project and compared output to Xcode, to see how it works on a larger codebase.
Example of a covered line with an uncovered branch: