Skip to content

minimum coverage rounds preventing checking real 100% #679

Closed

Description

@gleseur

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

Activity

  1. PragTob commented on May 24, 2018

    @PragTob
    Collaborator

    👋

    Thanks for the report!

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

    That change is welcome of course :)

  2. added a commit that references this issue on May 24, 2018
  3. gleseur commented on May 24, 2018

    @gleseur
    ContributorAuthor

    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.

  4. PragTob commented on Dec 3, 2019

    @PragTob
    Collaborator

    And merged 💃

  5. added theissue type on May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions