Closed matt-usurp closed 7 years ago
Yes you can, but ATM you must execute the command per each folder. This feature can be implemented, for sure, and would be a great addition :)
I was looking at a way of implementing this but realised that the config file will be interesting. Ideally the exclude would be for both header
and use-sort
so would there just be a new key at the root of the file called excluded-directories
or something?
If so, I would ideally make a constant for this root key (similar to whats in the two command classes) so where would you suggest I put that? In ConfigLoader
?
@matt-usurp this should be placed as an abstract configuration, so it make me thinks that maybe a small refactoring of the commands should be great.
Apart of that, yes, --exclude-dir
would be great. Will be added for next major release.
Thanks.
I won't be able to get around to doing this for about a week.
If its not implemented by then I will have another go now that the other fixer has been merged in too. The configuration loading doesn't look like it makes much sense once a command will use two root keys, so there is a refactor there but I don't want to do such a large scale change myself.
@matt-usurp almost done, will update the code tonight :)
This is perfect!
Yeah looking at the scale of the refactor that was not something I was comfortable doing with one contribution. A nice refactor though, I will be upgrading to this as soon as possible!
Is it possible to add excluded or ignored directories? It would be great to be able to prevent it from trying to sort use statements in my
vendor
directory or something.