[vtk-developers] Need a client side hook for trailing whitespace

Marcus D. Hanwell marcus.hanwell at kitware.com
Tue Feb 7 09:36:10 EST 2012


On Mon, Feb 6, 2012 at 3:43 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Now that we are using gerrit for vtk changes, I think we need a
> trailing whitespace pre-commit hook. Currently this is caught by
> gerrit, but a developer does not see the defect on local commits.
>
This mail gives a summary, we turned it off,

http://www.vtk.org/pipermail/vtk-developers/2011-April/009638.html

This is largely the reason for making it a warning in Gerrit (not an
error). I would like to turn it back on (by adjusting .gitattributes
in VTK) and leave it on as a warning in the Gerrit content check
robot. That way, if there is good reason, the --no-verify argument can
be used to bypass the local hooks.

The complicating factor there is that this would also bypass the
Gerrit Change-Id hook, this is probably acceptable for those few cases
where you need to push through commits with whitespace issues but
perhaps too far for some? The checks only ever concerned new changes,
and would continue to do so.

Marcus



More information about the vtk-developers mailing list