cachix/git-hooks.nix

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

yajo opened this issue · 0 comments

yajo commented

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?