magician79/php-coverage-tools

CLI tools for normalizing PHP coverage reports by removing non-executable files

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/magician79/php-coverage-tools

v0.1.2 2025-12-26 22:38 UTC

This package is auto-updated.

Last update: 2025-12-26 23:09:03 UTC


README

CI

Small CLI utilities for normalizing PHP coverage reports.

Why

Coverage tools like Cobertura correctly report interfaces and pure abstract contracts as having zero executable lines. However, many summary generators treat these files as 0% covered, producing misleading health metrics.

This repository contains small, explicit tools that enforce the rule:

Non-executable files must not affect coverage health.

Tools

filter-cobertura

Removes files with lines-valid="0" from a Cobertura XML report.

filter-cobertura input.xml output.xml

This ensures that coverage summaries and badges reflect real executable code.