lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: tabs in .java files
Date Fri, 26 Mar 2004 01:04:47 GMT
:)

Ah, here we go again....  the joys of folks with strong opinions on 
code formatting.

I would argue they wouldn't creep back in if we didn't let them.  I 
personally do not use tabs.  While certainly unofficial and nothing 
that this codebase has to live by, tabs are banned here:

	http://www.apache.org/dev/styleguide.html

Tabs make commit messages messy, and this is one of the primary reasons 
I dislike them, and they also are quite messy in my IDE.  8 space 
stops?  Using spaces we indent 4 spaces - so this would by definition 
offset things oddly if tabs and spaces get mismatched, which is what 
I've observed in a lot of Lucene's .java files.

Code formatting should not be coupled with bug/feature commits, at the 
very least - it makes seeing the real change difficult.

	Erik


On Mar 25, 2004, at 5:18 PM, Doug Cutting wrote:

> -1
>
> They'll just creep back in.  Plus I generally think reformatting is a 
> bad reason for a commit.  It clogs and confuses diffs.  Changes should 
> be confined to fixing bugs and adding features.  To me, reformatting 
> is more evil than tabs.
>
> http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html
>
> Tab's are acceptable so long as things indent correctly with 8 space 
> stops.
>
> Doug
>
> Otis Gospodnetic wrote:
>> Tabs are evil.
>> Does anyone mind me doing s/\t/  /g on *.java?
>> I'd love to clean up, but am wondering if that will affect our ability
>> to apply patches sitting in Bugzilla.
>> Does anyone have any experience with this?
>> A quick glance at the man page for patch seems to indicate that this
>> should not be a problem:
>> -l  or  --ignore-whitespace
>> Match  patterns  loosely, in case tabs or spaces have been munged in
>> your files.  Any sequence of one or more blanks in  the  patch  file
>> matches  any  sequence in the original file, and sequences of blanks
>> at the ends of lines are  ignored.   Normal  characters  must  still
>> match  exactly.  Each line of the context must still match a line in
>> the original file.
>> I'll commit my local s/\t/  /g changes, unless somebody speaks up by
>> tomorrow morning, CET.
>> Thanks,
>> Otis
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message