-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more options to fail on insufficient coverage #170
Comments
I think referencing absolute values instead of percentages is an interesting idea. I'm fine with adding this as an experimental option.
I think this is not necessarily a good thing when there are multiple PRs, because it easily causes merge conflicts. |
Thanks!
This would happen only if you had multiple PRs that are all worsening coverage. Something nobody would want I presume. And if it happens regularly then enforcing coverage is probably not what is wanted. |
EDIT: see #170 (comment) |
Ah, sorry, I somehow misunderstood that the values passed to those options are concrete values. It is thresholds, so my comment above is wrong. |
Enforcing code coverage is good and the current option
--fail-under-lines
is a way to do it but unfortunately rather crude one. Percentage is relative and may change due to amount of code changing vis-a-vis covered code. Thellvm-cov report
does provide absolute values of covered and uncovered for each of the 4 categories:The better way would therefore be to fail coverage on uncovered absolute values rather than percentages which is volatile. That way if new code is added that is fully covered the coverage will pass. However when new code is not fully covered it will also require changing of the threshold(s) which is good thing - it might be justified of course but nevertheless should be visible.
I propose the following options:
The text was updated successfully, but these errors were encountered: