Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Git hooks with pre-commit #2599
Adds git hooks via pre-commit hooks manager.
Has to be manually enabled:
Currently checks for:
You can run it also manually on the currently staged files:
Or on all files in the repo (this is also done in Jenkins):
endJunction left a comment
Works with AUR's python-pre-commit package for me.
Is it possible to integrate the clang-format pre-commit hook too? See https://github.com/ufz/ogs-utils/tree/master/dev/code-formatting/clang-format-pre-commit-hook
I have not added the linked clang-format hook as it specifially works on the acutal git diff. The pre-commit tool works a bit differently: it gives the hooks scripts the filenames of the changed files or all files in the repo (when running with