You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Apache Wiki <wi...@apache.org> on 2010/11/30 22:12:56 UTC

[Commons Wiki] Update of "CodeStyle" by sebbapache

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.

The "CodeStyle" page has been changed by sebbapache.
The comment on this change is: Some more suggested rules.
http://wiki.apache.org/commons/CodeStyle?action=diff&rev1=4&rev2=5

--------------------------------------------------

  ||Imports: No wildcards ||error ||
  ||Imports: Order by groups: java, javax, org, com ||warning ||
  ||Imports: Order in alphabetical order with a group ||warning ||
+ ||Indentation: (Java) use 4 spaces || warning ||
+ ||Indentation: (POM) prefer 4 spaces, allow 2, but be consistent within a file (1) || info ||
  ||Add your rule here ||warning ||
  
+ Notes:
+ 1. POMs tend to have quite deeply nested elements, and many elements can be long and awkward to wrap, so using 2 spaces is sometimes easier to read.
+ 

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


Re: [Commons Wiki] Update of "CodeStyle" by sebbapache

Posted by sebb <se...@gmail.com>.
On 30 November 2010 21:18, Ralph Goers <ra...@dslextreme.com> wrote:
>
> On Nov 30, 2010, at 1:12 PM, Apache Wiki wrote:
>
>> Dear Wiki user,
>>
>> You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.
>>
>> The "CodeStyle" page has been changed by sebbapache.
>> The comment on this change is: Some more suggested rules.
>> http://wiki.apache.org/commons/CodeStyle?action=diff&rev1=4&rev2=5
>>
>> --------------------------------------------------
>>
>>  ||Imports: No wildcards ||error ||
>>  ||Imports: Order by groups: java, javax, org, com ||warning ||
>>  ||Imports: Order in alphabetical order with a group ||warning ||
>> + ||Indentation: (Java) use 4 spaces || warning ||
>> + ||Indentation: (POM) prefer 4 spaces, allow 2, but be consistent within a file (1) || info ||
>>  ||Add your rule here ||warning ||
>>
>> + Notes:
>> + 1. POMs tend to have quite deeply nested elements, and many elements can be long and awkward to wrap, so using 2 spaces is sometimes easier to read.
>> +
>
> Actually, I would have said prefer 2 spaces, allow 4.  I prefer 2 spaces for all xml files for exactly the reason you stated - the elements can be long and awkward to wrap. When you need to add something to the pom and it becomes too long it means you have to respace the whole file which generates a lot of noise in the diff.

OK, feel free to change it.

> Ralph
>
>
> ---------------------------------------------------------------------
> 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: [Commons Wiki] Update of "CodeStyle" by sebbapache

Posted by Ralph Goers <ra...@dslextreme.com>.
On Nov 30, 2010, at 1:12 PM, Apache Wiki wrote:

> Dear Wiki user,
> 
> You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.
> 
> The "CodeStyle" page has been changed by sebbapache.
> The comment on this change is: Some more suggested rules.
> http://wiki.apache.org/commons/CodeStyle?action=diff&rev1=4&rev2=5
> 
> --------------------------------------------------
> 
>  ||Imports: No wildcards ||error ||
>  ||Imports: Order by groups: java, javax, org, com ||warning ||
>  ||Imports: Order in alphabetical order with a group ||warning ||
> + ||Indentation: (Java) use 4 spaces || warning ||
> + ||Indentation: (POM) prefer 4 spaces, allow 2, but be consistent within a file (1) || info ||
>  ||Add your rule here ||warning ||
> 
> + Notes:
> + 1. POMs tend to have quite deeply nested elements, and many elements can be long and awkward to wrap, so using 2 spaces is sometimes easier to read.
> + 

Actually, I would have said prefer 2 spaces, allow 4.  I prefer 2 spaces for all xml files for exactly the reason you stated - the elements can be long and awkward to wrap. When you need to add something to the pom and it becomes too long it means you have to respace the whole file which generates a lot of noise in the diff.

Ralph


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