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

add optional argument to check only a specific path or file #199

Open
ricfio opened this issue Nov 20, 2021 · 3 comments
Open

add optional argument to check only a specific path or file #199

ricfio opened this issue Nov 20, 2021 · 3 comments

Comments

@ricfio
Copy link
Contributor

ricfio commented Nov 20, 2021

Feature Request

Q A
New Feature yes
RFC yes
BC Break no

Summary

It would be great if you could pass to phparkitect an optional argument to check only a specific path or file instead of all project files.

Examples:

./vendor/bin/phparkitect check src/Domain
./vendor/bin/phparkitect check src/Domain/FooBar.php
@micheleorselli
Copy link
Contributor

Is there any specific use case are you to cover with this feature?
First thing that comes to my mind is changing ClassSet::fromDir('src') to ClassSet::fromDir('src/Domain') in the config file

@ricfio
Copy link
Contributor Author

ricfio commented Nov 21, 2021

Sure, you can change the path using ClassSet::fromDir(...) in the configuration but I would like to temporarily change the path to check at runtime to focus only on one file or folder when there are too many checking errors.

@fain182
Copy link
Collaborator

fain182 commented Nov 22, 2021

this is an interesting use case... like when you want to execute an isolated test case... maybe could be a filter on command line

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

No branches or pull requests

3 participants