Feature request: a special "<text>" value for the hooks.yaml "files" field
See original GitHub issueHi,
I had to implement this kind of “binary-files-filtering-out” today: https://github.com/Lucas-C/pre-commit-hooks/blob/master/pre_commit_hooks/utils.py#L10
So I made a quick overview of the existing checkers, and I found only 2 that are targeting any text file: end-of-file-fixer and trailing-whitespaces. Both use a long list of known text files suffixes.
If ever you think this use case could come in handy, I’d suggest to provide a magic value like <any text file>
to the files
parameter in hooks.yaml, so that hooks developers don’t have to re-implement this filtering each time.
You can freely re-use the code I mentioned above if it comes handy to you.
Also, sorry for the 3-issues-opened-in-a-row 😃 I got really excited by this tool and ideas for improvements just flowed in ! But they are really just humble features suggestions.
Cheers
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top GitHub Comments
This is now available in 0.15.0 via
types: [text]
.Awesome ! Good job 😃