An important thing here is that this script won't abort the commit when practracker finds issues, which seems like a reasonable idea since maybe you want to fix all the practracker issues on a subsequence commit. However, this might be a problem for people using git wrappers (like me) that ignore git-commit output, since they might not notice the failure. Personally, I turned this into a pre-commit hook for this reason, but this might not work for other people.
An important thing here is that this script won't abort the commit when practracker finds issues, which seems like a reasonable idea since maybe you want to fix all the practracker issues on a subsequence commit. However, this might be a problem for people using git wrappers (like me) that ignore git-commit output, since they might not notice the failure. Personally, I turned this into a pre-commit hook for this reason, but this might not work for other people.
Tim, Nick, any opinions here?
If CI will fail when we push, git should also fail locally.
But I don't really mind when we fail.
Perhaps we should make it:
a pre-commit hook, to encourage frequent coders to write better code
a pre-push hook, so mergers don't push branches that will fail CI
I think some other tickets might do what I want here.
Trac: Summary: Add practracker as a post-commit git hook for frequent coders to Add practracker as a pre-commit and pre-push git hook for frequent coders
pretty cool! Almost there, but it seems like the pre-push hook (which is the one I'd like to use) does not block the push if practracker complains. It does throw the practracker error but does not abort the push (at least in my testing with a github branch).