Before we embark on this, are we all agreed that once this hook is in place, no one will say “Hey, why are you complaining about my commit message? It passed the validation.”
People seem to think that any formatting errors not found by checkstyle are - by definition - not formatting errors, and I don’t want to repeat the same mistake here.
On Nov 19, 2018, at 11:13 PM, Vladimir Sitnikov <sitnikov.vladimir@xxxxxxxxx> wrote:
I've updated the subject to match the actual content
Francis>I feel that a git hook would probably still be the easiest and
Francis>way to get started
1) Just in case: I guess we need to confine automatic validation for
"master" branch only (or alike).
For instance, I tend to create tons of oops/fixup/t/tmp commits, and I
don't really want for the validator to blame me on each and every commit.
Ideally, it would validate only for "on push to apache.../master" (and/or
on commit to "local master branch")
2) Starting from Git 2.9, hook location could be configured via
core.hooksPath (see https://git-scm.com/docs/githooks ), so I guess we
would be fine if we just add the hooks to .githooks folder + a command to
It's not clear if we should try to activate the hooks automatically (e.g.
at mvn validate or something like that), however we could do that for
Travis and it could produce decent coverage.
PS. They say, Git on Windows executes hooks via its own bash, so the hooks
should just work: https://stackoverflow.com/a/18278072/1261287