You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2008/05/19 19:28:47 UTC

[NET] Tabs and spaces

Looks like most of NET uses spaces for indentation.

[There are about 28,000 lines starting with 4 or more spaces; only
about 2,000 lines starting with tab]

However, there are quite a few files that use tabs; it looks like the
assumption is that tabs are every 4 spaces - but of course this is not
necessarily how all editors and printers are set up...

Any views on fixing these?

I'm happy to do this.

I noticed the problem when creating some patches for NET.

S///

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


Re: [NET] Tabs and spaces

Posted by Julius Davies <ju...@gmail.com>.
Tabs make the baby Jesus cry.

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


Re: [NET] Tabs and spaces

Posted by Rahul Akolkar <ra...@gmail.com>.
On 5/20/08, sebb <se...@gmail.com> wrote:
> On 20/05/2008, Dennis Lundberg <de...@apache.org> wrote:
>  > Dare I suggest that we start working on a Commons wide code style document?
>  >
>  >  I'm willing to put in time setting up a Checkstyle configuration and an
>  > IDEA template, for whatever style we decide upon.
>  >
>  >  What style we should choose? I don't really care that much, but like sebb
>  > I'm allergic to tabs in any kind of source code. I say pick a style from one
>  > of the components that actually have a defined code style already.
>  >
>  >  Doing this doesn't mean that we have to change every component right at
>  > once. We can start by establishing a standard and then slip that into each
>  > component when it is time to release that component.
>  >
>
>
> Maybe some rules should be mandatory - no tabs - and some rules could
>  be advisory - e.g. max. line length.
>
>  Seems to me that - apart from tabs - the style that a project uses is
>  not all that important so long as it is documented and consistent
>  within a project.
>
<snip/>

I tend to agree. I'd be for respecting existing style as we've said
before [1] and avoiding frivolous code changes to conform to any
particular style. I don't intend to make any such changes (either now
or before a release) and I'd suggest we don't require these changes.

If this is causing a serious hit on productivity for some of us, I'd
suggest those of us start with localized changes (per component) where
they are trying to be productive.

-Rahul

[1] http://commons.apache.org/patches.html



>  Perhaps start collecting ideas in a Wiki page, and then convert to
>  formal docn. later?
>
>
>  >
>  >  Oberhuber, Martin wrote:
>  >
>  > > Is there any guideline on tabs vs spaces in Commons?
>  > >
>  > > Given that due to the Copyright Text Change we have
>  > > A diff on each and every file already, now might be
>  > > A good time to do such a global cleanup, in order
>  > > To simplify diffs / patches in upcoming bugfix Releases, and cross-porting
>  > patches between the 1.5 and 2.0 streams.
>  > >
>  > > Cheers,
>  > > --
>  > > Martin Oberhuber, Senior Member of Technical Staff, Wind River
>  > > Target Management Project Lead, DSDP PMC Member
>  > > http://www.eclipse.org/dsdp/tm
>  > >
>  > >
>  > > > -----Original Message-----
>  > > > From: Dennis Lundberg [mailto:dennisl@apache.org] Sent: Montag, 19. Mai
>  > 2008 19:54
>  > > > To: Commons Developers List
>  > > > Subject: Re: [NET] Tabs and spaces
>  > > >
>  > > > sebb wrote:
>  > > >
>  > > > > Looks like most of NET uses spaces for indentation.
>  > > > >
>  > > > > [There are about 28,000 lines starting with 4 or more spaces; only
>  > > > > about 2,000 lines starting with tab]
>  > > > >
>  > > > > However, there are quite a few files that use tabs; it
>  > > > >
>  > > > looks like the
>  > > >
>  > > > > assumption is that tabs are every 4 spaces - but of course
>  > > > >
>  > > > this is not
>  > > >
>  > > > > necessarily how all editors and printers are set up...
>  > > > >
>  > > > > Any views on fixing these?
>  > > > >
>  > > > I'd replace each tab with 4 spaces.
>  > > >
>  > > >
>  > > > > I'm happy to do this.
>  > > > >
>  > > > > I noticed the problem when creating some patches for NET.
>  > > > >
>  > > > > S///
>  > > > >
>  > > > >

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


Re: [NET] Tabs and spaces

Posted by Dennis Lundberg <de...@apache.org>.
Dennis Lundberg wrote:
> sebb wrote:
>> On 20/05/2008, Dennis Lundberg <de...@apache.org> wrote:
>>> Dare I suggest that we start working on a Commons wide code style 
>>> document?
>>>
>>>  I'm willing to put in time setting up a Checkstyle configuration and an
>>> IDEA template, for whatever style we decide upon.
>>>
>>>  What style we should choose? I don't really care that much, but like 
>>> sebb
>>> I'm allergic to tabs in any kind of source code. I say pick a style 
>>> from one
>>> of the components that actually have a defined code style already.
>>>
>>>  Doing this doesn't mean that we have to change every component right at
>>> once. We can start by establishing a standard and then slip that into 
>>> each
>>> component when it is time to release that component.
>>>
>>
>> Maybe some rules should be mandatory - no tabs - and some rules could
>> be advisory - e.g. max. line length.
> 
> That's reasonable.
> 
>> Seems to me that - apart from tabs - the style that a project uses is
>> not all that important so long as it is documented and consistent
>> within a project.
> 
> Right, consistency is key here.
> 
>> Perhaps start collecting ideas in a Wiki page, and then convert to
>> formal docn. later?
> 
> Sounds like a good plan. Collect the rules and then try to reach 
> consensus regarding how important they are.
> 
> Checkstyle has three levels at which code violations can be flagged: 
> info, warning and error. These could be translated into:
> - info:    Follow this if you like. If you don't it's no big deal
> - warning: You should consider following this rule
> - error:   This must must be fixed before the next release
> 
> I'll get a wiki page started...

The wiki page is up:

http://wiki.apache.org/commons/CodeStyle

> 
>>
>>>  Oberhuber, Martin wrote:
>>>
>>>> Is there any guideline on tabs vs spaces in Commons?
>>>>
>>>> Given that due to the Copyright Text Change we have
>>>> A diff on each and every file already, now might be
>>>> A good time to do such a global cleanup, in order
>>>> To simplify diffs / patches in upcoming bugfix Releases, and 
>>>> cross-porting
>>> patches between the 1.5 and 2.0 streams.
>>>> Cheers,
>>>> -- 
>>>> Martin Oberhuber, Senior Member of Technical Staff, Wind River
>>>> Target Management Project Lead, DSDP PMC Member
>>>> http://www.eclipse.org/dsdp/tm
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Dennis Lundberg [mailto:dennisl@apache.org] Sent: Montag, 19. 
>>>>> Mai
>>> 2008 19:54
>>>>> To: Commons Developers List
>>>>> Subject: Re: [NET] Tabs and spaces
>>>>>
>>>>> sebb wrote:
>>>>>
>>>>>> Looks like most of NET uses spaces for indentation.
>>>>>>
>>>>>> [There are about 28,000 lines starting with 4 or more spaces; only
>>>>>> about 2,000 lines starting with tab]
>>>>>>
>>>>>> However, there are quite a few files that use tabs; it
>>>>>>
>>>>> looks like the
>>>>>
>>>>>> assumption is that tabs are every 4 spaces - but of course
>>>>>>
>>>>> this is not
>>>>>
>>>>>> necessarily how all editors and printers are set up...
>>>>>>
>>>>>> Any views on fixing these?
>>>>>>
>>>>> I'd replace each tab with 4 spaces.
>>>>>
>>>>>
>>>>>> I'm happy to do this.
>>>>>>
>>>>>> I noticed the problem when creating some patches for NET.
>>>>>>
>>>>>> S///
>>>>>>
>>>>>>
>>>>>>
>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail:
>>> dev-unsubscribe@commons.apache.org
>>>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>> -- 
>>>>> Dennis Lundberg
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:
>>> dev-unsubscribe@commons.apache.org
>>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:
>>> dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>>
>>>>
>>>
>>>  --
>>>  Dennis Lundberg
>>>
>>> ---------------------------------------------------------------------
>>>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>  For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 
> 


-- 
Dennis Lundberg

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


Re: [NET] Tabs and spaces

Posted by Dennis Lundberg <de...@apache.org>.
sebb wrote:
> On 20/05/2008, Dennis Lundberg <de...@apache.org> wrote:
>> Dare I suggest that we start working on a Commons wide code style document?
>>
>>  I'm willing to put in time setting up a Checkstyle configuration and an
>> IDEA template, for whatever style we decide upon.
>>
>>  What style we should choose? I don't really care that much, but like sebb
>> I'm allergic to tabs in any kind of source code. I say pick a style from one
>> of the components that actually have a defined code style already.
>>
>>  Doing this doesn't mean that we have to change every component right at
>> once. We can start by establishing a standard and then slip that into each
>> component when it is time to release that component.
>>
> 
> Maybe some rules should be mandatory - no tabs - and some rules could
> be advisory - e.g. max. line length.

That's reasonable.

> Seems to me that - apart from tabs - the style that a project uses is
> not all that important so long as it is documented and consistent
> within a project.

Right, consistency is key here.

> Perhaps start collecting ideas in a Wiki page, and then convert to
> formal docn. later?

Sounds like a good plan. Collect the rules and then try to reach 
consensus regarding how important they are.

Checkstyle has three levels at which code violations can be flagged: 
info, warning and error. These could be translated into:
- info:    Follow this if you like. If you don't it's no big deal
- warning: You should consider following this rule
- error:   This must must be fixed before the next release

I'll get a wiki page started...

> 
>>  Oberhuber, Martin wrote:
>>
>>> Is there any guideline on tabs vs spaces in Commons?
>>>
>>> Given that due to the Copyright Text Change we have
>>> A diff on each and every file already, now might be
>>> A good time to do such a global cleanup, in order
>>> To simplify diffs / patches in upcoming bugfix Releases, and cross-porting
>> patches between the 1.5 and 2.0 streams.
>>> Cheers,
>>> --
>>> Martin Oberhuber, Senior Member of Technical Staff, Wind River
>>> Target Management Project Lead, DSDP PMC Member
>>> http://www.eclipse.org/dsdp/tm
>>>
>>>
>>>> -----Original Message-----
>>>> From: Dennis Lundberg [mailto:dennisl@apache.org] Sent: Montag, 19. Mai
>> 2008 19:54
>>>> To: Commons Developers List
>>>> Subject: Re: [NET] Tabs and spaces
>>>>
>>>> sebb wrote:
>>>>
>>>>> Looks like most of NET uses spaces for indentation.
>>>>>
>>>>> [There are about 28,000 lines starting with 4 or more spaces; only
>>>>> about 2,000 lines starting with tab]
>>>>>
>>>>> However, there are quite a few files that use tabs; it
>>>>>
>>>> looks like the
>>>>
>>>>> assumption is that tabs are every 4 spaces - but of course
>>>>>
>>>> this is not
>>>>
>>>>> necessarily how all editors and printers are set up...
>>>>>
>>>>> Any views on fixing these?
>>>>>
>>>> I'd replace each tab with 4 spaces.
>>>>
>>>>
>>>>> I'm happy to do this.
>>>>>
>>>>> I noticed the problem when creating some patches for NET.
>>>>>
>>>>> S///
>>>>>
>>>>>
>>>>>
>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:
>> dev-unsubscribe@commons.apache.org
>>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Dennis Lundberg
>>>>
>>>>
>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:
>> dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>
>>>>
>>>>
>>>
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>> dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>>
>>
>>  --
>>  Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


-- 
Dennis Lundberg

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


Re: [NET] Tabs and spaces

Posted by sebb <se...@gmail.com>.
On 20/05/2008, Dennis Lundberg <de...@apache.org> wrote:
> Dare I suggest that we start working on a Commons wide code style document?
>
>  I'm willing to put in time setting up a Checkstyle configuration and an
> IDEA template, for whatever style we decide upon.
>
>  What style we should choose? I don't really care that much, but like sebb
> I'm allergic to tabs in any kind of source code. I say pick a style from one
> of the components that actually have a defined code style already.
>
>  Doing this doesn't mean that we have to change every component right at
> once. We can start by establishing a standard and then slip that into each
> component when it is time to release that component.
>

Maybe some rules should be mandatory - no tabs - and some rules could
be advisory - e.g. max. line length.

Seems to me that - apart from tabs - the style that a project uses is
not all that important so long as it is documented and consistent
within a project.

Perhaps start collecting ideas in a Wiki page, and then convert to
formal docn. later?

>
>  Oberhuber, Martin wrote:
>
> > Is there any guideline on tabs vs spaces in Commons?
> >
> > Given that due to the Copyright Text Change we have
> > A diff on each and every file already, now might be
> > A good time to do such a global cleanup, in order
> > To simplify diffs / patches in upcoming bugfix Releases, and cross-porting
> patches between the 1.5 and 2.0 streams.
> >
> > Cheers,
> > --
> > Martin Oberhuber, Senior Member of Technical Staff, Wind River
> > Target Management Project Lead, DSDP PMC Member
> > http://www.eclipse.org/dsdp/tm
> >
> >
> > > -----Original Message-----
> > > From: Dennis Lundberg [mailto:dennisl@apache.org] Sent: Montag, 19. Mai
> 2008 19:54
> > > To: Commons Developers List
> > > Subject: Re: [NET] Tabs and spaces
> > >
> > > sebb wrote:
> > >
> > > > Looks like most of NET uses spaces for indentation.
> > > >
> > > > [There are about 28,000 lines starting with 4 or more spaces; only
> > > > about 2,000 lines starting with tab]
> > > >
> > > > However, there are quite a few files that use tabs; it
> > > >
> > > looks like the
> > >
> > > > assumption is that tabs are every 4 spaces - but of course
> > > >
> > > this is not
> > >
> > > > necessarily how all editors and printers are set up...
> > > >
> > > > Any views on fixing these?
> > > >
> > > I'd replace each tab with 4 spaces.
> > >
> > >
> > > > I'm happy to do this.
> > > >
> > > > I noticed the problem when creating some patches for NET.
> > > >
> > > > S///
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > >
> > > > To unsubscribe, e-mail:
> dev-unsubscribe@commons.apache.org
> > > > For additional commands, e-mail: dev-help@commons.apache.org
> > > >
> > > >
> > > >
> > >
> > > --
> > > Dennis Lundberg
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
> >
>
>
>  --
>  Dennis Lundberg
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

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


Re: [NET] Tabs and spaces

Posted by Dennis Lundberg <de...@apache.org>.
Dare I suggest that we start working on a Commons wide code style document?

I'm willing to put in time setting up a Checkstyle configuration and an 
IDEA template, for whatever style we decide upon.

What style we should choose? I don't really care that much, but like 
sebb I'm allergic to tabs in any kind of source code. I say pick a style 
from one of the components that actually have a defined code style already.

Doing this doesn't mean that we have to change every component right at 
once. We can start by establishing a standard and then slip that into 
each component when it is time to release that component.

Oberhuber, Martin wrote:
> Is there any guideline on tabs vs spaces in Commons?
> 
> Given that due to the Copyright Text Change we have
> A diff on each and every file already, now might be
> A good time to do such a global cleanup, in order
> To simplify diffs / patches in upcoming bugfix 
> Releases, and cross-porting patches between the 
> 1.5 and 2.0 streams.
> 
> Cheers,
> --
> Martin Oberhuber, Senior Member of Technical Staff, Wind River
> Target Management Project Lead, DSDP PMC Member
> http://www.eclipse.org/dsdp/tm
>  
>  
> 
>> -----Original Message-----
>> From: Dennis Lundberg [mailto:dennisl@apache.org] 
>> Sent: Montag, 19. Mai 2008 19:54
>> To: Commons Developers List
>> Subject: Re: [NET] Tabs and spaces
>>
>> sebb wrote:
>>> Looks like most of NET uses spaces for indentation.
>>>
>>> [There are about 28,000 lines starting with 4 or more spaces; only
>>> about 2,000 lines starting with tab]
>>>
>>> However, there are quite a few files that use tabs; it 
>> looks like the
>>> assumption is that tabs are every 4 spaces - but of course 
>> this is not
>>> necessarily how all editors and printers are set up...
>>>
>>> Any views on fixing these?
>> I'd replace each tab with 4 spaces.
>>
>>> I'm happy to do this.
>>>
>>> I noticed the problem when creating some patches for NET.
>>>
>>> S///
>>>
>>>
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>> -- 
>> Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


-- 
Dennis Lundberg

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


Re: [NET] Tabs and spaces

Posted by Niall Pemberton <ni...@gmail.com>.
On Tue, May 20, 2008 at 8:03 PM, sebb <se...@gmail.com> wrote:
> On 20/05/2008, Oberhuber, Martin <Ma...@windriver.com> wrote:
>>
>>  Is there any guideline on tabs vs spaces in Commons?
>
> Dunno ... my view is that tabs are nothing but trouble, and should
> never be used for formatting new code.

+1

Niall

>>  Given that due to the Copyright Text Change we have
>>  A diff on each and every file already, now might be
>>  A good time to do such a global cleanup, in order
>>  To simplify diffs / patches in upcoming bugfix
>>  Releases, and cross-porting patches between the
>>  1.5 and 2.0 streams.
>>
>
> Yes, indeed.
>
>>  Cheers,
>>
>> --
>>  Martin Oberhuber, Senior Member of Technical Staff, Wind River
>>  Target Management Project Lead, DSDP PMC Member
>>  http://www.eclipse.org/dsdp/tm
>>
>>
>>
>>
>>  > -----Original Message-----
>>  > From: Dennis Lundberg [mailto:dennisl@apache.org]
>>  > Sent: Montag, 19. Mai 2008 19:54
>>  > To: Commons Developers List
>>  > Subject: Re: [NET] Tabs and spaces
>>  >
>>  > sebb wrote:
>>  > > Looks like most of NET uses spaces for indentation.
>>  > >
>>  > > [There are about 28,000 lines starting with 4 or more spaces; only
>>  > > about 2,000 lines starting with tab]
>>  > >
>>  > > However, there are quite a few files that use tabs; it
>>  > looks like the
>>  > > assumption is that tabs are every 4 spaces - but of course
>>  > this is not
>>  > > necessarily how all editors and printers are set up...
>>  > >
>>  > > Any views on fixing these?
>>  >
>>  > I'd replace each tab with 4 spaces.
>>  >
>>  > > I'm happy to do this.
>>  > >
>>  > > I noticed the problem when creating some patches for NET.
>>  > >
>>  > > S///
>>  > >
>>  > >
>>  > ---------------------------------------------------------------------
>>  > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  > > For additional commands, e-mail: dev-help@commons.apache.org
>>  > >
>>  > >
>>  >
>>  >
>>  > --
>>  > Dennis Lundberg
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  > For additional commands, e-mail: dev-help@commons.apache.org
>>  >
>>  >
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

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


Re: [NET] Tabs and spaces

Posted by Rahul Akolkar <ra...@gmail.com>.
On 5/20/08, sebb <se...@gmail.com> wrote:
> On 20/05/2008, Oberhuber, Martin <Ma...@windriver.com> wrote:
>  >
>  >  Is there any guideline on tabs vs spaces in Commons?
>
>  Dunno ... my view is that tabs are nothing but trouble, and should
>  never be used for formatting new code.
>
<snip/>

There is atleast one place [1] where we insist on 4 spaces.

-Rahul

[1] http://commons.apache.org/patches.html

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


Re: [NET] Tabs and spaces

Posted by sebb <se...@gmail.com>.
On 20/05/2008, Oberhuber, Martin <Ma...@windriver.com> wrote:
>
>  Is there any guideline on tabs vs spaces in Commons?

Dunno ... my view is that tabs are nothing but trouble, and should
never be used for formatting new code.

>  Given that due to the Copyright Text Change we have
>  A diff on each and every file already, now might be
>  A good time to do such a global cleanup, in order
>  To simplify diffs / patches in upcoming bugfix
>  Releases, and cross-porting patches between the
>  1.5 and 2.0 streams.
>

Yes, indeed.

>  Cheers,
>
> --
>  Martin Oberhuber, Senior Member of Technical Staff, Wind River
>  Target Management Project Lead, DSDP PMC Member
>  http://www.eclipse.org/dsdp/tm
>
>
>
>
>  > -----Original Message-----
>  > From: Dennis Lundberg [mailto:dennisl@apache.org]
>  > Sent: Montag, 19. Mai 2008 19:54
>  > To: Commons Developers List
>  > Subject: Re: [NET] Tabs and spaces
>  >
>  > sebb wrote:
>  > > Looks like most of NET uses spaces for indentation.
>  > >
>  > > [There are about 28,000 lines starting with 4 or more spaces; only
>  > > about 2,000 lines starting with tab]
>  > >
>  > > However, there are quite a few files that use tabs; it
>  > looks like the
>  > > assumption is that tabs are every 4 spaces - but of course
>  > this is not
>  > > necessarily how all editors and printers are set up...
>  > >
>  > > Any views on fixing these?
>  >
>  > I'd replace each tab with 4 spaces.
>  >
>  > > I'm happy to do this.
>  > >
>  > > I noticed the problem when creating some patches for NET.
>  > >
>  > > S///
>  > >
>  > >
>  > ---------------------------------------------------------------------
>  > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  > > For additional commands, e-mail: dev-help@commons.apache.org
>  > >
>  > >
>  >
>  >
>  > --
>  > Dennis Lundberg
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  > For additional commands, e-mail: dev-help@commons.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

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


RE: [NET] Tabs and spaces

Posted by "Oberhuber, Martin" <Ma...@windriver.com>.
Is there any guideline on tabs vs spaces in Commons?

Given that due to the Copyright Text Change we have
A diff on each and every file already, now might be
A good time to do such a global cleanup, in order
To simplify diffs / patches in upcoming bugfix 
Releases, and cross-porting patches between the 
1.5 and 2.0 streams.

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
 
 

> -----Original Message-----
> From: Dennis Lundberg [mailto:dennisl@apache.org] 
> Sent: Montag, 19. Mai 2008 19:54
> To: Commons Developers List
> Subject: Re: [NET] Tabs and spaces
> 
> sebb wrote:
> > Looks like most of NET uses spaces for indentation.
> > 
> > [There are about 28,000 lines starting with 4 or more spaces; only
> > about 2,000 lines starting with tab]
> > 
> > However, there are quite a few files that use tabs; it 
> looks like the
> > assumption is that tabs are every 4 spaces - but of course 
> this is not
> > necessarily how all editors and printers are set up...
> > 
> > Any views on fixing these?
> 
> I'd replace each tab with 4 spaces.
> 
> > I'm happy to do this.
> > 
> > I noticed the problem when creating some patches for NET.
> > 
> > S///
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> > 
> > 
> 
> 
> -- 
> Dennis Lundberg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 

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


Re: [NET] Tabs and spaces

Posted by Dennis Lundberg <de...@apache.org>.
sebb wrote:
> Looks like most of NET uses spaces for indentation.
> 
> [There are about 28,000 lines starting with 4 or more spaces; only
> about 2,000 lines starting with tab]
> 
> However, there are quite a few files that use tabs; it looks like the
> assumption is that tabs are every 4 spaces - but of course this is not
> necessarily how all editors and printers are set up...
> 
> Any views on fixing these?

I'd replace each tab with 4 spaces.

> I'm happy to do this.
> 
> I noticed the problem when creating some patches for NET.
> 
> S///
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


-- 
Dennis Lundberg

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