lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Re: Line length in Lucene/Solr code
Date Mon, 25 Feb 2013 11:05:16 GMT
+1

Shai


On Mon, Feb 25, 2013 at 1:01 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> +1
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Mon, Feb 25, 2013 at 5:59 AM, Uwe Schindler <uwe@thetaphi.de> wrote:
> > +1 to raise the default of 80 to a minimum of 120. I really hate short
> lines (and I find that the longer lines are much more readable) :-)
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: uwe@thetaphi.de
> >
> >> -----Original Message-----
> >> From: Toke Eskildsen [mailto:te@statsbiblioteket.dk]
> >> Sent: Monday, February 25, 2013 11:39 AM
> >> To: dev@lucene.apache.org
> >> Subject: Line length in Lucene/Solr code
> >>
> >> According to https://wiki.apache.org/solr/HowToContribute, Sun's code
> style
> >> conventions should be used when writing contributions for Lucene and
> Solr.
> >> Said conventions state that lines in code should be 80 characters or
> less,
> >> "since they're not handled well by many terminals and tools":
> >> http://www.oracle.com/technetwork/java/javase/documentation/codecon
> >> ventions-136091.html#313
> >>
> >> A quick random inspection of the Lucene/Solr code base tells me that
> this
> >> recommendation is not followed: Out of 20 source files, only a single
> one
> >> adhered to the 80 characters/line limit and that was StorageField,
> which is an
> >> interface.
> >>
> >> I am all for a larger limit as I find that it makes Java code a lot
> more readable.
> >> With current tools, Java code needs to be formatted using line breaks
> and
> >> indents (as opposed to fully dynamic tool-specific re-flow of the
> code). That
> >> formatting is dependent on a specific maximum line width to be
> consistent.
> >>
> >>
> >> With that in mind, I suggest that the code style recommendation is
> expanded
> >> with the notion that a maximum of x characters/line should be used,
> where x
> >> is something more than 80. Judging by a quick search, 120 chars seems
> to be
> >> a common choice.
> >>
> >> Regards,
> >> Toke Eskildsen
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For
> additional
> >> commands, e-mail: dev-help@lucene.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: dev-help@lucene.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Mime
View raw message