On Fri, Feb 08, 2019 at 09:06:04AM +0100, Harald Welte wrote:
wireshark has somwthing like a pre-commit hook in
their repository that
prevents you from even pushing changes that don't pass validation (such
as non-terminated value_string arrays).
probably a pre-push hook in the upstream repos.
Things like coding style / value strings validation would be ok for that.
(obviously not full CI runs that take minutes and longer)
Also I wonder whether gerrit's java git stack allows having a pre-push hook.
I kind of like the idea of using a code formatting linter,
it (hopefully) completely cuts out all discussion.
I remember some blog post about that ... don't know where. The point was, any
and all of these little things should be enforced by CI, it creates a clear
situation and cuts out endless discussions.
Would be trivial to run a code reformatting command before submitting to
gerrit.
However, the hard part would be to get a reliable code formatter that doesn't
do nonsense. For example, I think dexter once used such tool that produced a
bit of nonsense indenting / formatting every now and then.
But... I'm heading back to inter-MSC handover now.
~N