Ability to run subset of hooks, not just one
See original GitHub issueHi folks! Wondering if adding the ability to run a subset of checks rather than just one is possible.
For example, instead of only being able to run a black
check: pre-commit run black
. Be able to run something like pre-commit run black,flake8
to run the black
and flake8
checks.
This would be especially useful for me since I am working on creating a shared pre-commit container/configuration for multiple repositories, but not all of them want to run every available check (only a subset).
I’m also aware there is a workaround for this, running something like pre-commit run black && pre-commit run flake8
but figured another solution may be more elegant.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Hooks at a Glance - React
Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class. Hooks are...
Read more >React useEffect Hook when only one of the effect's deps ...
itemId]); // I want this effect to run only when 'props.itemId' changes, // not when 'items' changes useEffect(onItemIdChange, [ props.
Read more >How To Manage State with Hooks on React Components
With Hooks, state objects are completely independent of each other, so you can have as many state objects as you want.
Read more >Understanding common frustrations with React Hooks
React Hooks can be frustrating despite their popularity and widespread use. Learn about some of the drawbacks to using React Hooks.
Read more >Can We All Just Admit React Hooks Were a Bad Idea? - Medium
Part 1: SOLID reasons why hooks are a bad idea ... if you wanted to maintain your state outside the components, but not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Likewise, even support for globs, like
which would run all hooks matching the pattern
I’d really benefit from this. I have a great many hooks, organized into “suites” (auto-formatters, linters, typecheckers) I want to run together (as a little script).
Current options
&&
CON
This has to re-stash between every single hook, which is really adding up
SKIP
CON
This is much harder to understand and maintain
Desired option