commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Lundberg <denn...@apache.org>
Subject Re: [NET] Tabs and spaces
Date Tue, 20 May 2008 19:58:08 GMT
sebb wrote:
> On 20/05/2008, Dennis Lundberg <dennisl@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


Mime
View raw message