[PATCH for comments] configure: install a whitespace checking pre-commit hook for developers
Swen Schillig
swen at vnet.ibm.com
Tue Apr 10 09:36:04 UTC 2018
On Tue, 2018-04-10 at 09:53 +0200, Stefan Metzmacher via samba-
technical wrote:
> Am 10.04.2018 um 09:31 schrieb Swen Schillig via samba-technical:
> > I really like Douglas' work as well, especially the part where
> > the pre-commit hook gets installed auto-magically if there isn't
> > one.
> >
> > But, is trailing white-spaces all we want to check for ?
> > Why not go a bit further and have a few more of those "annoying"
> > violations flagged as well ?
> >
> > Like
> > - leading white-space
> > - code indent should use tabs where possible
> > - space required before the open parenthesis '('
> > - line over 80 characters
> > - Missing a blank line after declarations
> > - space prohibited before that close parenthesis ')'
> > - ...
> >
> > especially if all those checks can be turned off, if required for
> > whatever reason, with a simple "git --no-check ...."
>
> I was also wondering about that.
>
> I think we should use some like wireshark,
> were the real script[s] are part of the checkout and the pre-commit
> hook
> is just a wrapper arround it, that way we can improve the script step
> by
> step.
>
> See
> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=too
> ls/pre-commit
>
> metze
I think this is all going into the right direction (more automatic checks),
but I'm not sure why we should invest development efforts while there is
already a really matured tool available which only needs to be configured.
I promise I will mention it only this one time again, but what about using
checkpatch instead of reinventing the wheel ?
checkpatch is used in a variety of other non-kernel projects,
like GANESHA (user space NFS server) which is a project with
very similar requirements.
So why not having a look at least ?
Cheers Swen
More information about the samba-technical
mailing list