-
Notifications
You must be signed in to change notification settings - Fork 96
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
Code coverage is different for text and html rcov formatter in metric_fu #153
Comments
@crv Do I understand you that the simplecov-rcov-text formatter gives different results than the default simplecov formatter? How are you running the coverage metric? Can you paste the output of |
We should really either implement our own simplecov formatter or finally just abandon an semblance of rcov. Either way, such a PR would be control of coverage back in the hands of metric_fu. Also see #156 where the coverage metric will be run if the external file is found; rather than if it is configured. |
In any case, thanks for adding a test case, here. I've started spiking out an internal MetricFu formatter #201 |
Currently only rcov-format specific See issue #153 for known bug Adapted from https://github.com/kina/simplecov-rcov-text/ by @kina, William 'Kina' <thekina@gmail.com> MIT-licesned
Currently only rcov-format specific See issue #153 for known bug Adapted from https://github.com/kina/simplecov-rcov-text/ by @kina, William 'Kina' <thekina@gmail.com> MIT-licensed
I finally got around to writing this test, and the numbers appear to be 4/7 for both. Did you test this differently or perhaps the bug went away? |
Will break old RCov behavior where a file is that is loaded, but no lines executed, will have a coverage percentage. Under the new rubric, it will be 0.0, which really is more correct. Since we've already removed support for running via RCov, this won't be a problem.
Will break old RCov behavior where a file is that is loaded, but no lines executed, will have a coverage percentage. Under the new rubric, it will be 0.0, which really is more correct. Since we've already removed support for running via RCov, this won't be a problem.
Will break old RCov behavior where a file is that is loaded, but no lines executed, will have a coverage percentage. Under the new rubric, it will be 0.0, which really is more correct. Since we've already removed support for running via RCov, this won't be a problem.
One other thing which I observed with Rcov in metric_fu is ... If I try to find coverage using the simplecov text formatter and HTML formatter then there is a difference.
I tried to find out the reason why it happens, I found that
If you have method e.g.
As per HTML format, the code coverage percent is 2/7 = 0.28 (28% - 7 relevant lines, 2 lines covered 5 lines missed)
As per the text format the code coverage percent is 5/10 = 0.5 (50% - 10 relevant lines, 5 lines covered 5 lines missed)
This is weird. The reason here is text format takes last 3 end statements into the consideration while HTML formatter ignores it.
The text was updated successfully, but these errors were encountered: