-
Notifications
You must be signed in to change notification settings - Fork 361
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
Add precommit #601
Add precommit #601
Conversation
I am not quite sure what "pre commit" means here. This looks like a GitHub hook which sounds like pre push to me. Otoh why would one need a local installation for that? |
Git itself supports various hooks https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks The idea is to test and format code before the commit is created. This reduces the probability that a commit would not pass CI or break the program. I created a simpler PR which does not format the complete code. So it is simpler to merge, review and may extend it later to this complex configuration. |
e63f37e
to
8cff239
Compare
Ok, I rebased this and re-run the pre-commit on the code. I now have one failure (see checks). Looks like my local version sorts the imports differently than in the CI. Any idea on how to get rid of that issue? |
@florianfesti did you run it at least twice because of the amount of changes? |
run pre-commit
91f12e1
to
eae0e7b
Compare
No, my local version seems to order that one import differently. I'll merge anyway.May be I disable the import ordering later on if that creates too much of an issue. |
Thanks for the feedback. I will try to find the reason for this behavour. |
Possible configuration for pre-commit as suggested in #600 .
Second commit just formats the code and may should be dropped before merge and done by maintainer.