Closed aerickson closed 2 years ago
That’s a cool idea! What are the advantages to having some custom yaml (like black) vs. just adding the urlchecker command to a pre commit hook file?
Sorry, editing my response... I kind of missed what you were asking.
Managing git hooks with pre-commit vs manually offers a few advantages:
pre-commit install
). a big problem for teams.longer intro to pre-commit: https://pre-commit.com/index.html#intro
hey @aerickson ! So I finally took a closer look, and decided to give it a shot to generate a pre-commit hook! Design wise, I think this likely is better to live in a different repository, the reason being that we need to change the client (as you found) and we can easily do that in a custom module. @aerickson and @SuperKogito would you care to try it out?
https://github.com/urlstechie/pre-commit
I'm relatively new to using pre-commit so please try the dummy example I added, along with adding custom arguments (it would be good to have an example for that). I'm also thinking we would want a plain pre-commit run
to work, however when I do that I don't see any input files, so let's chat about how to get that working! When all is good I can PR here with a link to the repository.
Happy Sunday, and thanks!
Great work @vsoch. This looks nice, I am curious to see how it goes further. Unfortunately I will be able to check this at the earliest on Sunday.
Closing, please re-open an issue on the pre-commit repo if there are any!
urlchecker is sweet. It would be great if it was easier to run. Lots of projects use pre-commit (https://pre-commit.com/).
I think all that's required is to create a file like Black provides:
https://github.com/psf/black/blob/master/.pre-commit-hooks.yaml