Project coverage decrease on deleted line

First, I would like to thank you for the nice codecov. io project

PR on GitHub is here Remove redundant code by hexagonrecursion · Pull Request #334 · twisted/towncrier · GitHub

Here is this diff Code coverage done right.

There is a line of unused code that was removed.

Codecov delta is reporting a decrease in coverage.

I think that this is bug as that line was removed since it was doing nothing. it was just a useless assignment without any side effects.

I am reporting this as maybe this is a simple example that can help improve your algorithm.

Regards

@adiroiban, thanks for the bug report, this is definitely useful. The reason for the decrease in reporting is actually just math. For example, a repo with 3 lines of code that have 2 lines covered will have lower coverage when one of the covered lines is removed

2/3 > 1/2

1 Like

Same case here: Support arbitrary dictionary keys by wyfo · Pull Request #307 · wyfo/apischema · GitHub
I’ve removed two useless assertions, and my pipeline fails…

This is indeed an annoying bug. Will it be fixed soon?