Skip to content

Allow not taking line measurements #845

Open
@PragTob

Description

@PragTob

Should only be tackled after #843 and #844 (as they'll make it much much easier I reckon).

I want us to be able to run without taking line coverage measurements. Right now Line coverage is always measured and it's the default.

So for now I want us to be able to run simplecov with only branch coverage enabled, but later on also only method and oneshot lines coverage.

Not sure how we'd deactivate line coverage yet, my current proposal would be something:

use_coverage :branch

# later on extendable to also take multiples

use_coverage :branch, :methods

As line coverage is deeply ingrained into simplecov trying this might crash in unexpected places and I believe it's better to fix them in small PRs (if possible) and not one big PR.

I believe our best bet is more general data structures that can work for every coverage criterion like the coverage method introduced to FileList and SourceFile which then maps coverage criterion to an instance of CoverageStatistics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions