Re: pygi's style



On Tue, May 25, 2010 at 1:23 PM, Tomeu Vizoso
<tomeu vizoso collabora co uk> wrote:
> Hi,
>
> we have discussed in #pygi the convenience of increasing the
> consistency of the C code style in PyGI.
>
> I have been trying for some hours and I don't think we can get easily
> a pre-commit hook that checks only the modified lines.
>
> Thus, I propose passing the whole codebase through GNU indent with the
> inconvenience that it brings to git blame usage.
>
> I fear that, otherwise, the code base will get more and more
> inconsistent as time passes.
>
> The indent invocation that is closer to the existing code is:
>
> indent -gnu -ts4 -i4 -nut -br -brs -npcs -ce
>
> It changes 2001 lines from a total of 7065. Would be great if someone
> found a bit of time to tune the parameters further.
>
> Regards,
>
> Tomeu
> _______________________________________________
> python-hackers-list mailing list
> python-hackers-list gnome org
> http://mail.gnome.org/mailman/listinfo/python-hackers-list
>

I'm pretty strongly opposed to doing this.  I think git blame is
immensely valuable (so you know who to ask questions) and nuking 30%
of that ability is pretty serious.  Especially since we have so many
people working on pygi it is very nice to use git blame to find out
who to ask questions to when you don't understand how something works.

Since we have a pretty ingrained patch review process now we could
enforce style rules on all new patches.  Is there anyway we can run a
style check on a .diff file?

Or, something else that I think might be acceptable, is if we run the
auto-indent but try and preserve git blame as much as we can.  E.g.
have people run auto-indent on the code they wrote and submit patches
in pieces.

Just some 2c
-Z


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]