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

Run hook multiple times (a.k.a. extend & rename other hooks) #406

Open
yajo opened this issue Mar 12, 2024 · 0 comments
Open

Run hook multiple times (a.k.a. extend & rename other hooks) #406

yajo opened this issue Mar 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@yajo
Copy link
Contributor

yajo commented Mar 12, 2024

Here you can see a real world usage of multiple invocations to the same hook: https://github.com/OCA/sale-workflow/blob/3016b43cef41a162c423be3322f2a3bc67447001/.pre-commit-config.yaml#L145-L156

They're essentially splitting pylint hook in 2:

  • once to run optional checks and report them without blocking the commit
  • another time to run required checks and do block the commit if it fails

Upstream pre-commit config is list-based, whereas here it's dict-based (see #250). Thus, how to replicate that without having to redefine the whole pylint hook?

@sandydoo sandydoo added the enhancement New feature or request label May 2, 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

2 participants