arkitect icon indicating copy to clipboard operation
arkitect copied to clipboard

add optional argument to check only a specific path or file

Open ricfio opened this issue 4 years ago • 3 comments

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

ricfio avatar Nov 20 '21 13:11 ricfio

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

micheleorselli avatar Nov 21 '21 09:11 micheleorselli

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.

ricfio avatar Nov 21 '21 10:11 ricfio

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

fain182 avatar Nov 22 '21 11:11 fain182