Skip to content
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

minimum coverage rounds preventing checking real 100% #679

Closed
gleseur opened this issue May 24, 2018 · 3 comments
Closed

minimum coverage rounds preventing checking real 100% #679

gleseur opened this issue May 24, 2018 · 3 comments

Comments

@gleseur
Copy link
Contributor

gleseur commented May 24, 2018

Hello,

We enforce 100% coverage (so we expecter every line to be covered) on our apps but after a certain number a lines, the minimum coverage passes while some lines are not covered due to rounding.

For instance, it says "32847 / 32848 LOC (100.0%) covered"

I suggest changing
https://github.com/colszowka/simplecov/blob/92a7b4df103978f3131b803fa499477fe7d8387e/lib/simplecov.rb#L218
to
covered_percent = result.covered_percent.floor(2)

as I think it is enough to solve our issue and should be mostly transparent to other users

I'll submit a pull request if you are ok with the change.

Note: we're running 0.16.1

Thanks

@PragTob
Copy link
Collaborator

PragTob commented May 24, 2018

👋

Thanks for the report!

Wow that's some dedication, what company is that if I might ask? ;)

That change is welcome of course :)

gleseur added a commit to gleseur/simplecov that referenced this issue May 24, 2018
@gleseur
Copy link
Contributor Author

gleseur commented May 24, 2018

Thanks @PragTob
I opened #680 accordingly.

To answer your question, we're Shippingbo, a French startup.
If you start with that requirement, it's not so hard, and quite satisfying, to stick to it. The hard part is catching up if you let it drift.

@PragTob
Copy link
Collaborator

PragTob commented Dec 3, 2019

And merged 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants