作者:爱我独自等待_白兔窝2013 | 来源:互联网 | 2023-08-22 11:12
I'm migrating some tasks from a
to my pre-commit config. This gives me the equivalent of
, but I'd like to be able to tag groups of hooks as
or
tasks so I can do something like:
1 2
| pre-commit install --group lint
pre-commit run -a --group build |
I'd like to do this because I otherwise have a ton of duplication between my
and pre-commit config.
该提问来源于开源项目:pre-commit/pre-commit
(I may be wrong) but it seems like your current goals are:
- only run a specific list of things during pre-commit (maybe all?) (I'm not even sure this is one of your goals, basing this off of your original post and not your example configuration)
This is not one of my goals.
- In some make targets, run a specific set of hooks against all files
This is what I am trying to achieve. What I was missing was that you could pass a hook id to run. I basically had it backwards. Thanks for the help.
(I do think adding your makefile snippet above to the docs as an example would be a good thing)