hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pi song" <pi.so...@gmail.com>
Subject Re: code formatting rules?
Date Thu, 28 Feb 2008 12:20:56 GMT
You can configure Checkstyle to treat style violations as warnings so we can
just use this as a guideline. This way we can gradually enforce and keep
changing the code to the same style bit by bit. New code to be committed
should not introduce new warnings if it's not too critical.

What do you think?

On 2/28/08, Benjamin Francisoud <benjamin.francisoud@joost.com> wrote:
>
> I think what stefan is proposing is to make it part of the build
> process...
> I have already seen this in cruisecontrol build .xml file using
> checkstyle.
>
> If you try to do "ant compile" and some code doesn't follow coding
> convention, the build will fail.
>
> That's quite constraining but you are sure all you're code follow coding
> convention at any time...
> Some people may find it annoying... in my experience, it must be a team
> decision.
>
> Moving to such a process would require to do a bulk formatting of pig
> current code at some point.
>
> --
> Benjamin Francisoud
>
>
> Olga Natkovich a écrit :
> > We have done part of it - converting tabs to spaces. What other changes
> > do you feel are important to do early?
> >
> > The general rule is to follow the style of the file in which you are
> > making changes and not to mix reformatting with other patches because
> > they make the review process very confusing.
> >
> > Olga
> >
> >
> >> -----Original Message-----
> >> From: Stefan Groschupf [mailto:sg@101tec.com]
> >> Sent: Tuesday, February 26, 2008 4:19 PM
> >> To: pig-dev@incubator.apache.org
> >> Subject: Re: code formatting rules?
> >>
> >>
> >>> We do have coding conventions, as mentioned here:
> >>> http://wiki.apache.org/pig/HowToContribute
> >>> .  We use the ones you reference, except that we use spaces rather
> >>> than tabs.  As for characters per line, we do still use 80.
> >>>
> >>  Even if
> >>
> >>> we don't live in the middle ages some of us like to have multiple
> >>> panes open at a time and be able to see across them :)
> >>>
> >> I'm fine wiht 80 too - no discussion need.
> >>
> >> It looks to me most of the code does not follow this coding
> >> conventions. I'm always not sure if a patch should follow the coding
> >> conventions in this one class or use the java once - it is getting
> >> messy in any case.
> >>
> >> Even if it is very unpopular and painful one day we might
> >> need to run
> >> a code formatter over all classes (or step by step)and I
> >> suggest to do
> >> that earlier than later.
> >> Writing patches would be easier after that.
> >>
> >> Just my 2 cents.
> >> Stefan
> >>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message