-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look into automatic enable #8
Comments
This is neat, it only requires that each user pick a template dir and run one git and one pre-commit command on each machine they want to set it up for. It does still require that you have a viable pre-commit python environment on that machine to run the pre-commit command with. We should check out how the resulting hook script looks and add instructions to this repo. |
This totally blows up on my windows, but seems to have worked nicely for my linux desktop. Note that you may want to edit the shebang on the script after it is generated, for mine it was hardcoded to try |
After editing the shebang to just |
Blows up how? |
Two ways:
|
Where were you running those from? I was able to set it up on my personal Windows computer just now using git-bash. I had no problems running After set up, I was able to run |
I'm running it through powershell, I'll try again and do it inside an arbitrary git directory, and failing that see if it works through git bash for me. If git bash ends up being the solution to all windows problems then I am 100% ok with that. |
Running inside a git directory and iterating through the options for specifying directories made it work, I just had to specify it as |
Why not use https://pre-commit.ci/ ? It's free for public repos. You can enable it for pull requests to prevent PRs from messing up the repo. |
Thank you @rruiter87, I didn't know this existed. I'm definitely going to integrate it into our CI pipelines. |
Saw this today: https://pre-commit.com/#automatically-enabling-pre-commit-on-repositories
If it works, it'd be a lot easier than trying to get everyone to run
pre-commit install
every time they clone a repo.The text was updated successfully, but these errors were encountered: