First of all, thank you very much for starting this project 馃挌
I really liked that you introduced the --directory option. I was missing this always in pre-commit.
It would be an awesome addition, if we could also get a --file-filters (or whatever name suits you) option allowing us to provide patterns and prek will then only check files matching the patterns.
Example use cases I think of are
- I want to check all
.foo files in the workspace
- I want to test all files below
../test/.. directories
I know one can achieve this by using --files and combining this with git ls-files. However, I believe this is needlessly clunky for something which I consider a standard use case.
Assuming you are open for the request at all, I see the following design decisions for this new option:
- Does this new option have to be used mutually exclusive with respect to
--all-files and --directory? Or is it allowed to use --all-files or --directory and then on top apply further file filters.
- Should the option expect glob or regex patterns
No strong opinion on those. Although, If I could freely choose, I guess being able to combine --directoy with filters would be nice as this would allow simpler patterns in some cases. Also regex seems like the most powerful choice for writing file patterns.
First of all, thank you very much for starting this project 馃挌
I really liked that you introduced the
--directoryoption. I was missing this always inpre-commit.It would be an awesome addition, if we could also get a
--file-filters(or whatever name suits you) option allowing us to provide patterns and prek will then only check files matching the patterns.Example use cases I think of are
.foofiles in the workspace../test/..directoriesI know one can achieve this by using
--filesand combining this withgit ls-files. However, I believe this is needlessly clunky for something which I consider a standard use case.Assuming you are open for the request at all, I see the following design decisions for this new option:
--all-filesand--directory? Or is it allowed to use--all-filesor--directoryand then on top apply further file filters.No strong opinion on those. Although, If I could freely choose, I guess being able to combine
--directoywith filters would be nice as this would allow simpler patterns in some cases. Also regex seems like the most powerful choice for writing file patterns.