Skip to content
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

default_stages should be split up into 2 options #451

Open
sandydoo opened this issue May 21, 2024 · 0 comments
Open

default_stages should be split up into 2 options #451

sandydoo opened this issue May 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sandydoo
Copy link
Member

sandydoo commented May 21, 2024

Currently, default_stages controls two things:

  1. The stages that each hook supports by default. As a result, all of our hooks don't even support the manual stage, unless one overrides this option. In pre-commit, this is set to all stages.
  2. Which hooks are installed.

This combination makes it difficult to allow all of our hooks to run in any stage by default, without also installing all of them. Unfortunately, fixing this looks like a breaking change.

pre-commit now has a new option: default_install_hook_types. This matches the installation semantics of our current default_stages.

And default_stages is then only used as a fallback for when hooks don't specify any stages.

@sandydoo sandydoo added the enhancement New feature or request label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant