You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simone Tripodi <si...@apache.org> on 2011/05/14 12:09:44 UTC

[OGNL] code style

Hi all guys,
OGNL code is formatted using a mixture of various styles, I hope
everybody agrees on adopting one unique style.
I propose to adopt the Maven Style[1] that is already widely adopted
and supported by IDEs.
Thoughts? Objections? If agree I would quickly proceed, just let me know!
SImo

[1] http://maven.apache.org/developers/conventions/code.html

http://people.apache.org/~simonetripodi/
http://www.99soft.org/

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


Re: [OGNL] code style

Posted by Simone Tripodi <si...@apache.org>.
I see, that's great, thanks!!! :)
I'm in the middle of the process of migrating the tests to junit4, so
if you have spare time to dedicate to OGNL feel free to re-enable the
checkstyle config!
Thanks a lot!!!
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Sat, May 14, 2011 at 4:03 PM, Olivier Lamy <ol...@apache.org> wrote:
> they are bundled with the checkstyle plugin  (see [1] )
> So nothing to do except pom configuration :-)
>
> /Olivier
>
> [1] http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/
>
> 2011/5/14 Simone Tripodi <si...@apache.org>:
>> Merci Olivier!!
>> I didn't find where config/maven_checks.xml is! Can you help me please?
>> Feel free to commit yourself! And thanks!!!
>> Simo
>>
>> http://people.apache.org/~simonetripodi/
>> http://www.99soft.org/
>>
>>
>>
>> On Sat, May 14, 2011 at 3:50 PM, Olivier Lamy <ol...@apache.org> wrote:
>>> Check the pom here http://svn.apache.org/repos/asf/maven/pom/trunk/maven/pom.xml
>>>
>>> De rien ! :-)
>>>
>>> 2011/5/14 Simone Tripodi <si...@apache.org>:
>>>> Great! can you point me please to an already existing configuration? I
>>>> guess in Maven core I should find something, no?
>>>> Merci en avant!
>>>> Simo
>>>>
>>>> http://people.apache.org/~simonetripodi/
>>>> http://www.99soft.org/
>>>>
>>>>
>>>>
>>>> On Sat, May 14, 2011 at 12:29 PM, Olivier Lamy <ol...@apache.org> wrote:
>>>>> +1
>>>>> Checkstyle configuration will need update
>>>>>
>>>>> --
>>>>> Olivier
>>>>>
>>>>>  Le 14 mai 2011 12:10, "Simone Tripodi" <si...@apache.org> a écrit :
>>>>>> Hi all guys,
>>>>>> OGNL code is formatted using a mixture of various styles, I hope
>>>>>> everybody agrees on adopting one unique style.
>>>>>> I propose to adopt the Maven Style[1] that is already widely adopted
>>>>>> and supported by IDEs.
>>>>>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>>>>>> SImo
>>>>>>
>>>>>> [1] http://maven.apache.org/developers/conventions/code.html
>>>>>>
>>>>>> http://people.apache.org/~simonetripodi/
>>>>>> http://www.99soft.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
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Olivier Lamy
>>> http://twitter.com/olamy
>>> http://www.linkedin.com/in/olamy
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> --
> Olivier Lamy
> http://twitter.com/olamy
> http://www.linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> 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: [OGNL] code style

Posted by Olivier Lamy <ol...@apache.org>.
they are bundled with the checkstyle plugin  (see [1] )
So nothing to do except pom configuration :-)

/Olivier

[1] http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/

2011/5/14 Simone Tripodi <si...@apache.org>:
> Merci Olivier!!
> I didn't find where config/maven_checks.xml is! Can you help me please?
> Feel free to commit yourself! And thanks!!!
> Simo
>
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
>
>
>
> On Sat, May 14, 2011 at 3:50 PM, Olivier Lamy <ol...@apache.org> wrote:
>> Check the pom here http://svn.apache.org/repos/asf/maven/pom/trunk/maven/pom.xml
>>
>> De rien ! :-)
>>
>> 2011/5/14 Simone Tripodi <si...@apache.org>:
>>> Great! can you point me please to an already existing configuration? I
>>> guess in Maven core I should find something, no?
>>> Merci en avant!
>>> Simo
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://www.99soft.org/
>>>
>>>
>>>
>>> On Sat, May 14, 2011 at 12:29 PM, Olivier Lamy <ol...@apache.org> wrote:
>>>> +1
>>>> Checkstyle configuration will need update
>>>>
>>>> --
>>>> Olivier
>>>>
>>>>  Le 14 mai 2011 12:10, "Simone Tripodi" <si...@apache.org> a écrit :
>>>>> Hi all guys,
>>>>> OGNL code is formatted using a mixture of various styles, I hope
>>>>> everybody agrees on adopting one unique style.
>>>>> I propose to adopt the Maven Style[1] that is already widely adopted
>>>>> and supported by IDEs.
>>>>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>>>>> SImo
>>>>>
>>>>> [1] http://maven.apache.org/developers/conventions/code.html
>>>>>
>>>>> http://people.apache.org/~simonetripodi/
>>>>> http://www.99soft.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
>>>
>>>
>>
>>
>>
>> --
>> Olivier Lamy
>> http://twitter.com/olamy
>> http://www.linkedin.com/in/olamy
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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


Re: [OGNL] code style

Posted by Simone Tripodi <si...@apache.org>.
Merci Olivier!!
I didn't find where config/maven_checks.xml is! Can you help me please?
Feel free to commit yourself! And thanks!!!
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Sat, May 14, 2011 at 3:50 PM, Olivier Lamy <ol...@apache.org> wrote:
> Check the pom here http://svn.apache.org/repos/asf/maven/pom/trunk/maven/pom.xml
>
> De rien ! :-)
>
> 2011/5/14 Simone Tripodi <si...@apache.org>:
>> Great! can you point me please to an already existing configuration? I
>> guess in Maven core I should find something, no?
>> Merci en avant!
>> Simo
>>
>> http://people.apache.org/~simonetripodi/
>> http://www.99soft.org/
>>
>>
>>
>> On Sat, May 14, 2011 at 12:29 PM, Olivier Lamy <ol...@apache.org> wrote:
>>> +1
>>> Checkstyle configuration will need update
>>>
>>> --
>>> Olivier
>>>
>>>  Le 14 mai 2011 12:10, "Simone Tripodi" <si...@apache.org> a écrit :
>>>> Hi all guys,
>>>> OGNL code is formatted using a mixture of various styles, I hope
>>>> everybody agrees on adopting one unique style.
>>>> I propose to adopt the Maven Style[1] that is already widely adopted
>>>> and supported by IDEs.
>>>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>>>> SImo
>>>>
>>>> [1] http://maven.apache.org/developers/conventions/code.html
>>>>
>>>> http://people.apache.org/~simonetripodi/
>>>> http://www.99soft.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
>>
>>
>
>
>
> --
> Olivier Lamy
> http://twitter.com/olamy
> http://www.linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> 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: [OGNL] code style

Posted by Olivier Lamy <ol...@apache.org>.
Check the pom here http://svn.apache.org/repos/asf/maven/pom/trunk/maven/pom.xml

De rien ! :-)

2011/5/14 Simone Tripodi <si...@apache.org>:
> Great! can you point me please to an already existing configuration? I
> guess in Maven core I should find something, no?
> Merci en avant!
> Simo
>
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
>
>
>
> On Sat, May 14, 2011 at 12:29 PM, Olivier Lamy <ol...@apache.org> wrote:
>> +1
>> Checkstyle configuration will need update
>>
>> --
>> Olivier
>>
>>  Le 14 mai 2011 12:10, "Simone Tripodi" <si...@apache.org> a écrit :
>>> Hi all guys,
>>> OGNL code is formatted using a mixture of various styles, I hope
>>> everybody agrees on adopting one unique style.
>>> I propose to adopt the Maven Style[1] that is already widely adopted
>>> and supported by IDEs.
>>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>>> SImo
>>>
>>> [1] http://maven.apache.org/developers/conventions/code.html
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://www.99soft.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
>
>



-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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


Re: [OGNL] code style

Posted by Simone Tripodi <si...@apache.org>.
Great! can you point me please to an already existing configuration? I
guess in Maven core I should find something, no?
Merci en avant!
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Sat, May 14, 2011 at 12:29 PM, Olivier Lamy <ol...@apache.org> wrote:
> +1
> Checkstyle configuration will need update
>
> --
> Olivier
>
>  Le 14 mai 2011 12:10, "Simone Tripodi" <si...@apache.org> a écrit :
>> Hi all guys,
>> OGNL code is formatted using a mixture of various styles, I hope
>> everybody agrees on adopting one unique style.
>> I propose to adopt the Maven Style[1] that is already widely adopted
>> and supported by IDEs.
>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>> SImo
>>
>> [1] http://maven.apache.org/developers/conventions/code.html
>>
>> http://people.apache.org/~simonetripodi/
>> http://www.99soft.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: [OGNL] code style

Posted by Olivier Lamy <ol...@apache.org>.
+1
Checkstyle configuration will need update

--
Olivier

 Le 14 mai 2011 12:10, "Simone Tripodi" <si...@apache.org> a écrit :
> Hi all guys,
> OGNL code is formatted using a mixture of various styles, I hope
> everybody agrees on adopting one unique style.
> I propose to adopt the Maven Style[1] that is already widely adopted
> and supported by IDEs.
> Thoughts? Objections? If agree I would quickly proceed, just let me know!
> SImo
>
> [1] http://maven.apache.org/developers/conventions/code.html
>
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

Re: [OGNL] code style

Posted by Olivier Lamy <ol...@apache.org>.
Hello,
Perso not blocker for me, the most important is to have easy setup for
ide and checkstyle files configured and not loose to much time with
that.

IMHO it's just a "taste" question (in my country some prefers Bordeaux
and others Bourgogne :-) ).

/Olivier

2011/5/16 Simone Tripodi <si...@apache.org>:
> Hi Maurizio!
> indeed, sometimes such style makes me smile because brings back old memories :)
> Well, I was too young at '90 to program - anyway I was a SuperMario
> champion - but my professors at University used that style :P
>
> Jokes a part, I thought that code style was a trivial topic, but at
> this point a vote makes sense, to find a general consensus.
> Thanks!!!
> Simo
>
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
>
>
>
> On Mon, May 16, 2011 at 9:54 AM, Maurizio Cucchiara
> <ma...@gmail.com> wrote:
>> Phil probably hit the nail on the head: contributors might have
>> problem to incorporate patches, the main risk is that every patch
>> contain a lot of noise and it's not good for the sake of reviewing.
>> I have no problem with most of the conventions (which are the default
>> settings of IntelliJ IIRC).
>> The only one that I don't like so much is the new line brace. It take
>> me back to 1990 when I used to code in C.
>> What about if we put to the vote it between ognl committers?
>>
>> On 16 May 2011 00:02, Phil Steitz <ph...@gmail.com> wrote:
>>> On 5/15/11 2:44 PM, Konstantin Kolinko wrote:
>>>> 2011/5/14 Simone Tripodi <si...@apache.org>:
>>>>> Hi all guys,
>>>>> OGNL code is formatted using a mixture of various styles, I hope
>>>>> everybody agrees on adopting one unique style.
>>>>> I propose to adopt the Maven Style[1] that is already widely adopted
>>>>> and supported by IDEs.
>>>>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>>>>> SImo
>>>>>
>>>>> [1] http://maven.apache.org/developers/conventions/code.html
>>>>>
>>>> -0 (not binding)
>>>>
>>>> 1. "Blocks: Always enclose with a new line brace." wastes lines if you
>>>> want to print the sources.
>>>>
>>>> 2. "White space: One space after control statements and between
>>>> arguments (i.e. if ( foo ) instead of if(foo)), myFunc( foo, bar, baz
>>>> ) instead of myFunc(foo,bar,baz))."
>>>>
>>>> I think that is ugly. Is there a reason behind this?
>>>>
>>>> 3. "Line wrapping: Always use a 120-column line width for Java code
>>>> and Javadoc."
>>>>
>>>> Line width of 120 is likely cause line wrapping when diffs are send
>>>> through e-mail and problems when doing side-by-side comparison. I am
>>>> not so worried about Java code, as lengthy statements are rare, but
>>>> more about Javadoc.
>>>>
>>>> My personal preference is "Java conventions", but with spaces instead of tabs.
>>>>
>>>> Are there any projects in Commons that already use the "Maven" style?
>>>
>>> I don't think so.  I agree with your comments, Konstantin, as do
>>> most current Commons sources.  Our convention here is that
>>> components maintain their own checkstyle configs and those actively
>>> working on components determine how they want the sources to look.
>>> So it comes down to a question for the [ognl] committers to decide.
>>> One point to consider is that strange settings (and I would
>>> personally call at least 1 and 2 above "strange") may make it harder
>>> for new contributors to get involved and for committers to evaluate
>>> and incorporate patches.
>>>
>>> Phil
>>>>
>>>> Best regards,
>>>> Konstantin Kolinko
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>>
>>
>> --
>> Maurizio Cucchiara
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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


Re: [OGNL] code style

Posted by Simone Tripodi <si...@apache.org>.
Hi Maurizio!
indeed, sometimes such style makes me smile because brings back old memories :)
Well, I was too young at '90 to program - anyway I was a SuperMario
champion - but my professors at University used that style :P

Jokes a part, I thought that code style was a trivial topic, but at
this point a vote makes sense, to find a general consensus.
Thanks!!!
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Mon, May 16, 2011 at 9:54 AM, Maurizio Cucchiara
<ma...@gmail.com> wrote:
> Phil probably hit the nail on the head: contributors might have
> problem to incorporate patches, the main risk is that every patch
> contain a lot of noise and it's not good for the sake of reviewing.
> I have no problem with most of the conventions (which are the default
> settings of IntelliJ IIRC).
> The only one that I don't like so much is the new line brace. It take
> me back to 1990 when I used to code in C.
> What about if we put to the vote it between ognl committers?
>
> On 16 May 2011 00:02, Phil Steitz <ph...@gmail.com> wrote:
>> On 5/15/11 2:44 PM, Konstantin Kolinko wrote:
>>> 2011/5/14 Simone Tripodi <si...@apache.org>:
>>>> Hi all guys,
>>>> OGNL code is formatted using a mixture of various styles, I hope
>>>> everybody agrees on adopting one unique style.
>>>> I propose to adopt the Maven Style[1] that is already widely adopted
>>>> and supported by IDEs.
>>>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>>>> SImo
>>>>
>>>> [1] http://maven.apache.org/developers/conventions/code.html
>>>>
>>> -0 (not binding)
>>>
>>> 1. "Blocks: Always enclose with a new line brace." wastes lines if you
>>> want to print the sources.
>>>
>>> 2. "White space: One space after control statements and between
>>> arguments (i.e. if ( foo ) instead of if(foo)), myFunc( foo, bar, baz
>>> ) instead of myFunc(foo,bar,baz))."
>>>
>>> I think that is ugly. Is there a reason behind this?
>>>
>>> 3. "Line wrapping: Always use a 120-column line width for Java code
>>> and Javadoc."
>>>
>>> Line width of 120 is likely cause line wrapping when diffs are send
>>> through e-mail and problems when doing side-by-side comparison. I am
>>> not so worried about Java code, as lengthy statements are rare, but
>>> more about Javadoc.
>>>
>>> My personal preference is "Java conventions", but with spaces instead of tabs.
>>>
>>> Are there any projects in Commons that already use the "Maven" style?
>>
>> I don't think so.  I agree with your comments, Konstantin, as do
>> most current Commons sources.  Our convention here is that
>> components maintain their own checkstyle configs and those actively
>> working on components determine how they want the sources to look.
>> So it comes down to a question for the [ognl] committers to decide.
>> One point to consider is that strange settings (and I would
>> personally call at least 1 and 2 above "strange") may make it harder
>> for new contributors to get involved and for committers to evaluate
>> and incorporate patches.
>>
>> Phil
>>>
>>> Best regards,
>>> Konstantin Kolinko
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> --
> Maurizio Cucchiara
>
> ---------------------------------------------------------------------
> 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: [OGNL] code style

Posted by Maurizio Cucchiara <ma...@gmail.com>.
Phil probably hit the nail on the head: contributors might have
problem to incorporate patches, the main risk is that every patch
contain a lot of noise and it's not good for the sake of reviewing.
I have no problem with most of the conventions (which are the default
settings of IntelliJ IIRC).
The only one that I don't like so much is the new line brace. It take
me back to 1990 when I used to code in C.
What about if we put to the vote it between ognl committers?

On 16 May 2011 00:02, Phil Steitz <ph...@gmail.com> wrote:
> On 5/15/11 2:44 PM, Konstantin Kolinko wrote:
>> 2011/5/14 Simone Tripodi <si...@apache.org>:
>>> Hi all guys,
>>> OGNL code is formatted using a mixture of various styles, I hope
>>> everybody agrees on adopting one unique style.
>>> I propose to adopt the Maven Style[1] that is already widely adopted
>>> and supported by IDEs.
>>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>>> SImo
>>>
>>> [1] http://maven.apache.org/developers/conventions/code.html
>>>
>> -0 (not binding)
>>
>> 1. "Blocks: Always enclose with a new line brace." wastes lines if you
>> want to print the sources.
>>
>> 2. "White space: One space after control statements and between
>> arguments (i.e. if ( foo ) instead of if(foo)), myFunc( foo, bar, baz
>> ) instead of myFunc(foo,bar,baz))."
>>
>> I think that is ugly. Is there a reason behind this?
>>
>> 3. "Line wrapping: Always use a 120-column line width for Java code
>> and Javadoc."
>>
>> Line width of 120 is likely cause line wrapping when diffs are send
>> through e-mail and problems when doing side-by-side comparison. I am
>> not so worried about Java code, as lengthy statements are rare, but
>> more about Javadoc.
>>
>> My personal preference is "Java conventions", but with spaces instead of tabs.
>>
>> Are there any projects in Commons that already use the "Maven" style?
>
> I don't think so.  I agree with your comments, Konstantin, as do
> most current Commons sources.  Our convention here is that
> components maintain their own checkstyle configs and those actively
> working on components determine how they want the sources to look.
> So it comes down to a question for the [ognl] committers to decide.
> One point to consider is that strange settings (and I would
> personally call at least 1 and 2 above "strange") may make it harder
> for new contributors to get involved and for committers to evaluate
> and incorporate patches.
>
> Phil
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Maurizio Cucchiara

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


Re: [OGNL] code style

Posted by Simone Tripodi <si...@apache.org>.
Hi guys,
thanks for the feedbacks!!! I understand your concerns, the main
reason behind such proposal is that OGNL already adopted a style that
matches, in the bigger part of the cases, to Maven style, so I thought
it would have been nice having a unique code style.
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Mon, May 16, 2011 at 12:02 AM, Phil Steitz <ph...@gmail.com> wrote:
> On 5/15/11 2:44 PM, Konstantin Kolinko wrote:
>> 2011/5/14 Simone Tripodi <si...@apache.org>:
>>> Hi all guys,
>>> OGNL code is formatted using a mixture of various styles, I hope
>>> everybody agrees on adopting one unique style.
>>> I propose to adopt the Maven Style[1] that is already widely adopted
>>> and supported by IDEs.
>>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>>> SImo
>>>
>>> [1] http://maven.apache.org/developers/conventions/code.html
>>>
>> -0 (not binding)
>>
>> 1. "Blocks: Always enclose with a new line brace." wastes lines if you
>> want to print the sources.
>>
>> 2. "White space: One space after control statements and between
>> arguments (i.e. if ( foo ) instead of if(foo)), myFunc( foo, bar, baz
>> ) instead of myFunc(foo,bar,baz))."
>>
>> I think that is ugly. Is there a reason behind this?
>>
>> 3. "Line wrapping: Always use a 120-column line width for Java code
>> and Javadoc."
>>
>> Line width of 120 is likely cause line wrapping when diffs are send
>> through e-mail and problems when doing side-by-side comparison. I am
>> not so worried about Java code, as lengthy statements are rare, but
>> more about Javadoc.
>>
>> My personal preference is "Java conventions", but with spaces instead of tabs.
>>
>> Are there any projects in Commons that already use the "Maven" style?
>
> I don't think so.  I agree with your comments, Konstantin, as do
> most current Commons sources.  Our convention here is that
> components maintain their own checkstyle configs and those actively
> working on components determine how they want the sources to look.
> So it comes down to a question for the [ognl] committers to decide.
> One point to consider is that strange settings (and I would
> personally call at least 1 and 2 above "strange") may make it harder
> for new contributors to get involved and for committers to evaluate
> and incorporate patches.
>
> Phil
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> ---------------------------------------------------------------------
>> 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: [OGNL] code style

Posted by Phil Steitz <ph...@gmail.com>.
On 5/15/11 2:44 PM, Konstantin Kolinko wrote:
> 2011/5/14 Simone Tripodi <si...@apache.org>:
>> Hi all guys,
>> OGNL code is formatted using a mixture of various styles, I hope
>> everybody agrees on adopting one unique style.
>> I propose to adopt the Maven Style[1] that is already widely adopted
>> and supported by IDEs.
>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>> SImo
>>
>> [1] http://maven.apache.org/developers/conventions/code.html
>>
> -0 (not binding)
>
> 1. "Blocks: Always enclose with a new line brace." wastes lines if you
> want to print the sources.
>
> 2. "White space: One space after control statements and between
> arguments (i.e. if ( foo ) instead of if(foo)), myFunc( foo, bar, baz
> ) instead of myFunc(foo,bar,baz))."
>
> I think that is ugly. Is there a reason behind this?
>
> 3. "Line wrapping: Always use a 120-column line width for Java code
> and Javadoc."
>
> Line width of 120 is likely cause line wrapping when diffs are send
> through e-mail and problems when doing side-by-side comparison. I am
> not so worried about Java code, as lengthy statements are rare, but
> more about Javadoc.
>
> My personal preference is "Java conventions", but with spaces instead of tabs.
>
> Are there any projects in Commons that already use the "Maven" style?

I don't think so.  I agree with your comments, Konstantin, as do
most current Commons sources.  Our convention here is that
components maintain their own checkstyle configs and those actively
working on components determine how they want the sources to look. 
So it comes down to a question for the [ognl] committers to decide. 
One point to consider is that strange settings (and I would
personally call at least 1 and 2 above "strange") may make it harder
for new contributors to get involved and for committers to evaluate
and incorporate patches.

Phil
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> 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: [OGNL] code style

Posted by sebb <se...@gmail.com>.
On 15 May 2011 22:44, Konstantin Kolinko <kn...@gmail.com> wrote:
> 2011/5/14 Simone Tripodi <si...@apache.org>:
>> Hi all guys,
>> OGNL code is formatted using a mixture of various styles, I hope
>> everybody agrees on adopting one unique style.
>> I propose to adopt the Maven Style[1] that is already widely adopted
>> and supported by IDEs.
>> Thoughts? Objections? If agree I would quickly proceed, just let me know!
>> SImo
>>
>> [1] http://maven.apache.org/developers/conventions/code.html
>>
>
> -0 (not binding)
>
> 1. "Blocks: Always enclose with a new line brace." wastes lines if you
> want to print the sources.

I agree; it also makes source harder to read on-screen because of
extra scrolling which is often needed.

> 2. "White space: One space after control statements and between
> arguments (i.e. if ( foo ) instead of if(foo)), myFunc( foo, bar, baz
> ) instead of myFunc(foo,bar,baz))."
>
> I think that is ugly. Is there a reason behind this?

IMO if(foo) is harder to read than if (foo).

I prefer spaces after commas in argument lists, i.e.

myFunc(foo, bar, baz)
not
myFunc(foo,bar,baz)

as it makes the arguments easier to separate visually.

But I agree leading and trailing spaces are not needed in arg lists.

> 3. "Line wrapping: Always use a 120-column line width for Java code
> and Javadoc."
>
> Line width of 120 is likely cause line wrapping when diffs are send
> through e-mail and problems when doing side-by-side comparison. I am
> not so worried about Java code, as lengthy statements are rare, but
> more about Javadoc.

Agree.

> My personal preference is "Java conventions", but with spaces instead of tabs.
>
> Are there any projects in Commons that already use the "Maven" style?
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> 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: [OGNL] code style

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/5/14 Simone Tripodi <si...@apache.org>:
> Hi all guys,
> OGNL code is formatted using a mixture of various styles, I hope
> everybody agrees on adopting one unique style.
> I propose to adopt the Maven Style[1] that is already widely adopted
> and supported by IDEs.
> Thoughts? Objections? If agree I would quickly proceed, just let me know!
> SImo
>
> [1] http://maven.apache.org/developers/conventions/code.html
>

-0 (not binding)

1. "Blocks: Always enclose with a new line brace." wastes lines if you
want to print the sources.

2. "White space: One space after control statements and between
arguments (i.e. if ( foo ) instead of if(foo)), myFunc( foo, bar, baz
) instead of myFunc(foo,bar,baz))."

I think that is ugly. Is there a reason behind this?

3. "Line wrapping: Always use a 120-column line width for Java code
and Javadoc."

Line width of 120 is likely cause line wrapping when diffs are send
through e-mail and problems when doing side-by-side comparison. I am
not so worried about Java code, as lengthy statements are rare, but
more about Javadoc.

My personal preference is "Java conventions", but with spaces instead of tabs.

Are there any projects in Commons that already use the "Maven" style?


Best regards,
Konstantin Kolinko

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