Skip to content

Warn when installing shims if hooks are unmatched #2056

@iamthad

Description

@iamthad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideaJust an idea

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions