-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude option not working if no staged_files use #441
Comments
Hi! This issue totally makes sense, but things are a bit complicated. You have That was the reason this feature wasn't implemented. But I think it makes sense to have it with these requirements:
Does it sound good? The only thing I have concerns about - this approach is not verbose because it is implicit and the logic is not obvious. If you have a better suggestion I can consider it and add this feature to the next release. I don't want to bring a breaking change and unexpected behavior. I also don't want to bring non-intuitive features that could be redesigned in the future when people get used to them (like the way |
I created this bug ticket for the sake of:
If the existing behavior make sense from a technical point of view / project maintenance and lefthook users have workaround, this limitation can be documented as is. |
I've released this feature in v1.3.6. Please, check it out 🚀 |
🔧 Summary
I want to exclude files from a lefthook command but I do not use files variable in my
run
command line.Lefthook version
1.2.7 c88a009cfa095e97ce47f8c5d5e1db5e6c844341
Steps to reproduce
Expected results
run
should not be executed when an excluded file is affected.Actual results
run
is always executed.Possible Solution
I found a workaround by turning my lefthook config into this
Screenshots (if appropriate)
Actual results
With workaround
The text was updated successfully, but these errors were encountered: