Re: pygi's style

On Tue, 2010-05-25 at 13:42 -0400, Zachary Goldberg wrote:
> On Tue, May 25, 2010 at 1:23 PM, Tomeu Vizoso
> <tomeu vizoso collabora co uk> wrote:
> > 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'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.

I agree with you. But I think letting the code as-is will not encourage
people to squeeze cleanly indented code in, quite the opposite.

> 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?

As Tomeu pointed out, commit hooks.

> 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.

Seems hardly doable to me.

Honestly, I'd go for an indent run asap. And I would also try to define
and enforce naming conventions, I might add.



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