Allow aliasing a hook and calling it by it's alias - #886
Conversation
asottile
left a comment
There was a problem hiding this comment.
I reviewed this, it's simple enough, but I'm still not convinced it's necessary if we already have a way to do this that works 😆
We'll, we don't really support this, unless you call it twice, with different config file as you suggested on the issue filed. Plus, it's a really simple change :) I'll address your other review comments and update the PR accordingly. |
|
Updated. Is this more what you had in mind? |
|
hmm, if I follow your suggestion, then tests like |
|
Polite ping. Yeah, I know it's the holidays and it can surely wait until next year :) |
asottile
left a comment
There was a problem hiding this comment.
SKIP is not handled properly, it's also unclear the "right" way SKIP should be handled -- should it exclude both the things?
|
I didn't review because the tests are failing :P |
It only makes sense for pre-commit to also skip based on a hook alias. Added support and test. |
|
Thanks!!! |
|
thanks @s0undt3ch for bearing with me 🎉 could you please add this information to the documentation? It'll land in the next minor release so you can use The docs live at https://github.com/pre-commit/pre-commit.github.io |
|
No problem. pre-commit/pre-commit.com#196 |
|
Got a timeframe for 1.14.0? |

This is the least intrusive change.
We could consider using the alias in the output instead of the ID, but I'll defer any more directions on this PR through it's review comments.