boxes
boxes copied to clipboard
Add precommit
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.
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.
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?
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.