-
Notifications
You must be signed in to change notification settings - Fork 200
Add fast path for the check-illegal-windows-names hook #1835
Description
To be entirely honest, I'm not sure how much benefit adding a fast path for this brings since this hook's implementation is literally just using the fail hook language with an appropriate regex in the files. I guess the main benefit is not having to clone the pre-commit/pre-commit-hooks repo and not having to parse the .pre-commit-hooks.yaml file for that file. With that said, the fact that it literally can be implemented with only a hook definition suggests it's probably not hard to implement?
Anyway, what this hook does is check that the staged file can be created on Windows. Documentation of what's allowed is available at: https://github.com/pre-commit/pre-commit-hooks/tree/main?tab=readme-ov-file#check-illegal-windows-names
If you want to mimic the behaviour of the original hook, you should probably just use its regex.
Link to description:
https://github.com/pre-commit/pre-commit-hooks/tree/main?tab=readme-ov-file#check-illegal-windows-names