Skip to content

feat: add '--only-covered' option to '--coverage'#1626

Open
SimonBroekaert wants to merge 1 commit intopestphp:4.xfrom
SimonBroekaert:feat/add_only-covered_option
Open

feat: add '--only-covered' option to '--coverage'#1626
SimonBroekaert wants to merge 1 commit intopestphp:4.xfrom
SimonBroekaert:feat/add_only-covered_option

Conversation

@SimonBroekaert
Copy link

What:

  • Bug Fix
  • New Feature

Description:

This PR adds a new --only-covered option to the Code Coverage feature.

This will hide all files from the output that have 0% coverage visually so that it does not break any other --coverage options like --min and --exact.

Reasoning

When working on large applications with lots of files and still wanting to achieve 100% test coverage, it is hard to keep an overview when you want to check if your newly written test file covers a whole feature/Model/Controller/Class...

That's why I propose this option that allows you to keep a better overview by hiding the files that are not covered at all.

Usage

vendor/bin/pest --coverage --only-covered

@SimonBroekaert SimonBroekaert force-pushed the feat/add_only-covered_option branch from 3416b94 to c362084 Compare February 6, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant