[PATCH for comments] configure: install a whitespace checking pre-commit hook for developers
Stefan Metzmacher
metze at samba.org
Tue Apr 10 10:48:49 UTC 2018
Am 10.04.2018 um 12:44 schrieb Ralph Böhme:
> Hi metze,
>
> On Tue, Apr 10, 2018 at 09:53:11AM +0200, Stefan Metzmacher 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.
>
> well, the problem that caused the whole discussion was trailing whitespace, so
> maybe we should, at least for now, just fix the problem at hand and defer
> more sophisticated stuff for later. I don't think there will be quick consensus
> on such a tool that correctly checks for everything in README.Coding and then
> there's also stuff in README.Coding that is dubious like formatting in for
> loops: we seem to expect
Sure, we should start simple, but we should have a way to extend it
easily. And if we have a the check logic directly in
.git/hooks/pre-commit, then we can't update it easily.
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180410/c568eee0/signature.sig>
More information about the samba-technical
mailing list