#2056·prek

Warn when installing shims if hooks are unmatched

Author: iamthadCreated May 6, 2026Updated May 7, 2026
Labelsidea

I understand that prek install only installs the Git shims for the stages you specify with --hook-type or default_install_hook_types in config and that this behavior is likely to remain for compatibility reasons.

However, I think it could be helpful if prek could emit a warning if there are hooks in the configuration files that don't match any of the stages being installed. For example, if the config file has hooks that only execute in pre-push and prek install is only installing the default pre-commit shim, it could emit a warning that those hooks wouldn't ever execute automatically.

This would make it easier for teams to make hooks that run in different circumstances, e.g., pre-push hooks that are a bit slower than would be ideal for running on each commit.