Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ignore attribute #7

Open
wants to merge 5 commits into
base: 2.x
Choose a base branch
from

Conversation

gehrisandro
Copy link
Contributor

This PR allows to ignore certain files or paths from being tested.

# ignore a specific file
vendor/bin/pest --type-coverage --ignore=MyLegacyFile.php

# or a path
vendor/bin/pest --type-coverage --ignore=my/legacy/code

# or multiple files and paths
vendor/bin/pest --type-coverage --ignore=MyLegacyFile.php --ignore=AnotherFile.php --ignore=my/legacy/code

# or comma separated
vendor/bin/pest --type-coverage --ignore=MyLegacyFile.php,AnotherFile.php

This is helpful if you want to enforce a minimal coverage for new code in a legacy project:

vendor/bin/pest --type-coverage --min=100 --ignore=MyLegacyFile.php

There is already a different PR which suggest to add an annotation to ignore individual lines from being tested, but for a legacy application I would prefer to ignore the whole files.

@SanderMuller
Copy link

LGTM! I have a folder with SOAP/WSDL generated files that spam my results

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.

2 participants