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

We are trying to fix this with our coverage offset feature, but we actually have a bug in it right now that we are working on. I don’t have a timeline yet when this will be fixed, but I do appreciate you bringing this up.