Skip to content

Merging .cov files ignores their filter settings #18

@fluxcorenz

Description

@fluxcorenz

Each .cov file has its own filters - whitelists, blacklists, etc. When performing a phpcov merge operation, these filters are ignored, and a default filter is used.

In particular, this results in any processUncoveredFilesFromWhitelist setting being ignored. The filenames are all in the .cov's filter whitelist, but the merge operation ignores them.

Possibly there could be filter options made available to the command line, which would allow filtering the complete set, or perhaps the filter within the file being merged could be used to check against, instead of the default (see PHP_CodeCoverage::merge line which reads:

 if (!$this->filter->isFiltered($file)) {

--could potentially check $that->filter()->isFiltered($file) in this instance instead?)

Or some kind of pre-merge on the filters could happen.

I wouldn't be adverse to implementing something if a preferred design was decided upon.

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