Replies: 5 comments
-
Hey! Thank you for the issue! Could you provide your The skipping happend when you provide Also if you provide a Anyway, you can send your |
Beta Was this translation helpful? Give feedback.
-
Thank you for the explanation. Here is my pre-commit:
scripts:
pre-commit-hook:
runner: bash
post-checkout:
scripts:
post-checkout-hook:
runner: bash
pre-push:
scripts:
phpstan-check:
glob: "{*.php,composer.lock,phpstan.neon}"
runner: bash |
Beta Was this translation helpful? Give feedback.
-
I see! Indeed, lefthook doesn't skip execution for scripts if there is a glob. I think this is a missing feature. I will prepare a fix soon. |
Beta Was this translation helpful? Give feedback.
-
Hey! I recalled that |
Beta Was this translation helpful? Give feedback.
-
I transferred this to a discussion because I don't think it is very useful to have I think it would be more convenient to use |
Beta Was this translation helpful? Give feedback.
-
We are running static analysis on the code, in
pre-push
hook. This takes a few minutes to complete.I want to skip running static analysis on PHP files, unless the modified files contains files matching the pattern
{*.php,composer.lock,phpstan.neon}
.Is it possible to skip running a command, unless the modified files list matches a glob pattern? I tried setting the
glob
setting to the above pattern, but it did not skip the command.Beta Was this translation helpful? Give feedback.
All reactions