Skip to content

Allow Overall Statistics Calculation without loading the files that are covered #573

Open
@jgonera

Description

@jgonera

Let's say I have a .resultset.json file but no source code. This file should be enough to generate some basics stats, like total code coverage, total number of lines, etc.

It is not possible now because SimpleCov refuses to record any data if the source code is not present:
https://github.com/colszowka/simplecov/blob/9bb1aa3a6735b16d4026c4c34db0de6973d9a883/lib/simplecov/result.rb#L29

This is unnecessary and very problematic for distributed CI systems. Even if the source code is there, it's even worse for big code bases because to calculate the total coverage, SimpleCov loads every source file: https://github.com/colszowka/simplecov/blob/05d877d1956bed364dfa4018edbc50c213ac94fe/lib/simplecov/source_file.rb#L83-L89 (and other parts of this class).

Is there any technical reason for this that I'm missing?

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