Skip to content

Support for "diff coverage" #886

Closed
Closed

Description

@deivid-rodriguez

The only codeclimate feature that I think it's not provided by default in simplecov is "diff coverage", namely, the ability to track the coverage of a set of source control changes, and to enforce restrictions on it.

For example, check that a given patch cannot have less that 50% coverage, which would mean that at least half of the lines being added or changed would need to be hit by tests.

Not sure if adding support for this inside simplecov could couple it too much with source control systems. Maybe a first step that does not require any knowledge about git would be to, given a coverage report, allow to query information about the partial coverage of a given set of { file_name, line_number } duples. I think that would simplify implementing diff coverage inside a plugin or something like that.

Thoughts?

Activity

  1. PragTob commented on Apr 14, 2020

    @PragTob
    Collaborator

    Hey @deivid-rodriguez !

    Definitey it'd be a great feature - not sure I'd wanna solve it inside simplecov.

    I'll loop in @grodowski as he reached out to me some time ago about his undercover which takes care of exactly that problem iirc.

    I like your proposed interface as it takes care of a significant chunk of the problem to the best of my understanding while not relying on VCS information. The latter of which I really wouldn't wanna have in simplecov core - we have way too many integrations as is.

  2. deivid-rodriguez commented on Apr 14, 2020

    @deivid-rodriguez
    CollaboratorAuthor

    Nice, I didn't know about undercover, I'll have a look at it!

  3. PragTob commented on Jun 23, 2020

    @PragTob
    Collaborator

    @deivid-rodriguez are you happy with what you found? :)

  4. deivid-rodriguez commented on Jun 23, 2020

    @deivid-rodriguez
    CollaboratorAuthor

    I never got to dig into this anymore 😞

  5. added theissue type on May 6, 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions