Hey @hexagonrecursion, great point here. And thanks for making the POC repo to show what you meant.
A few points here:
- Yes, though often removing code is a very healthy choice for a project, removing covered code can have the impact of lowering code coverage due to the math of numerator / denominator of code coverage.
—> 3/4 covered lines = 75%, 4/5 covered lines = 80%. Boo, percentages. We do try to make up for this using something we call “offset coverage”: https://docs.codecov.io/docs/coverage-offset
- If you only want to look at the added lines, that’s where
patch
coverage comes from. Status Checks
In your example commit you sent, the patch
status would be 100% as you added only covered lines.
Nonetheless, let me make sure the coverage offset
concept is working as expected from #1.