You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2004/03/02 23:58:47 UTC

[Proposal] Unified code format by Jalopy

Gang,

I would like to suggest that we introduce Jalopy to enforce code formatting.

This means that we define and agree upon a set of formatting rules, and place 
that into the a Jalopy definition file, and that this is executed against all 
our sources at regular intervals (such as after a change).
Maven supports Jalopy out of the box, so it is just a matter of running Maven 
with a jalopy target, but we need the definitions established first.

The "definition" includes all the gritty details on code format, such as "open 
brace placements", "space after paranthesis", "space around operators", 
"maximum length of line", "break line after operator" and so on, and so on...

Although we all have to "adjust" to some extent, I think we will all benefit 
from it in the long run. If there are Apache or Jakarta wide recommendations, 
I suggest we follow them.

I volunteer to set it all up, and explain all the individual settings that we 
have to agree upon.

What do you all think?

Niclas

-- 
+---------//-------------------+
|   http://www.bali.ac         |
|  http://niclas.hedhman.org   |
+------//----------------------+

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


Re: [Proposal] Unified code format by Jalopy

Posted by hammett <ha...@apache.org>.
> IMHO, there are a lot of code that "makes me upset".

Sure, me too. But that all about working with in an OS community, isn't? As
in any kind of relationship you have to learn how to deal with, or, if you
can't, change every piece of code that upsets you :-)

> if( expr ) return;

Agreed :-)


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


Re: [Proposal] Unified code format by Jalopy

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wednesday 03 March 2004 08:43, hammett wrote:
> I agree with formatting. But the Eclipse/Format is good enough. Jalopy was
> one of the worst things that happened to me this year.
>
> Anyway I think the standard for Avalon is being followed, don't you think?
> Its not a issue... At least in the code I saw...

IMHO, there are a lot of code that "makes me upset". Examples;

if( expr ) return;

Type type =
  shortExpression;

public class MyClass extends Abc implements Def,
    Rst
{
}

And other...
Maybe it is only me who is sensitive :o)


Niclas

-- 
+---------//-------------------+
|   http://www.bali.ac         |
|  http://niclas.hedhman.org   |
+------//----------------------+

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


Re: [Proposal] Unified code format by Jalopy

Posted by J Aaron Farr <fa...@apache.org>.
On Tue, 2004-03-02 at 19:43, hammett wrote:
> I agree with formatting. But the Eclipse/Format is good enough. Jalopy was
> one of the worst things that happened to me this year.
> 
> Anyway I think the standard for Avalon is being followed, don't you think?
> Its not a issue... At least in the code I saw...

and if it ever is, it's not hard to commit the change.

-- 
 jaaron  <http://jadetower.org>


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


Re: [Proposal] Unified code format by Jalopy

Posted by Timothy Bennett <ex...@comcast.net>.
hammett wrote:

> Checkstyle is pretty cool. We are using it together with cruisecontrol. Very
> neat!
> 
> AFAIK there is some project under avalon using it.
> 
> --
> hammett
> 
> ----- Original Message ----- 
> From: "Adam R. B. Jack" <aj...@trysybase.com>
> To: "Avalon Developers List" <de...@avalon.apache.org>
> 
> 
>>>Anyway I think the standard for Avalon is being followed, don't you
> 
> think?
> 
>>>Its not a issue... At least in the code I saw...
>>>

+1 on using checkstyle


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


Re: [Proposal] Unified code format by Jalopy

Posted by hammett <ha...@apache.org>.
Checkstyle is pretty cool. We are using it together with cruisecontrol. Very
neat!

AFAIK there is some project under avalon using it.

--
hammett

----- Original Message ----- 
From: "Adam R. B. Jack" <aj...@trysybase.com>
To: "Avalon Developers List" <de...@avalon.apache.org>


> >
> > Anyway I think the standard for Avalon is being followed, don't you
think?
> > Its not a issue... At least in the code I saw...
> >



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


Re: [Proposal] Unified code format by Jalopy

Posted by "Adam R. B. Jack" <aj...@trysybase.com>.
>
> Anyway I think the standard for Avalon is being followed, don't you think?
> Its not a issue... At least in the code I saw...
>

Could checkstyle not help -- i.e. ensure/report on standards conformance not
reformat to fit?

regards

Adam


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


Re: [Proposal] Unified code format by Jalopy

Posted by hammett <ha...@apache.org>.
I agree with formatting. But the Eclipse/Format is good enough. Jalopy was
one of the worst things that happened to me this year.

Anyway I think the standard for Avalon is being followed, don't you think?
Its not a issue... At least in the code I saw...



----- Original Message ----- 
From: "Niclas Hedhman" <ni...@hedhman.org>

> Thank you for the warning.


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


Re: [Proposal] Unified code format by Jalopy

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wednesday 03 March 2004 08:27, hammett wrote:
> > I would like to suggest that we introduce Jalopy to enforce code
>
> formatting.
>
> Please don't. This guy mess up with encoding, CVS thinks things unchanged
> were changed, its a nightmare!
>
> -1

Thank you for the warning.

Niclas

-- 
+---------//-------------------+
|   http://www.bali.ac         |
|  http://niclas.hedhman.org   |
+------//----------------------+

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


Re: [Proposal] Unified code format by Jalopy

Posted by hammett <ha...@apache.org>.
> I would like to suggest that we introduce Jalopy to enforce code
formatting.

Please don't. This guy mess up with encoding, CVS thinks things unchanged
were changed, its a nightmare!

-1

--
hammett



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


Re: [Proposal] Unified code format by Jalopy

Posted by Stephen McConnell <mc...@apache.org>.
Niclas Hedhman wrote:

> On Wednesday 03 March 2004 07:26, Stephen McConnell wrote:
> 
>>Niclas Hedhman wrote:
>>
>>>If there are Apache or Jakarta wide
>>>recommendations, I suggest we follow them.
> 
> 
>>http://avalon.apache.org/community/process/code-standards.html
> 
> 
> That is a good start, which I presume has its roots in Jakarta days. So I skip 
> these (=take them as 'decided') and concentrate on explaining ALL the other 
> possibly smaller items.

+1

> 
> Niclas


-- 

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

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


Re: [Proposal] Unified code format by Jalopy

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wednesday 03 March 2004 07:26, Stephen McConnell wrote:
> Niclas Hedhman wrote:
> >If there are Apache or Jakarta wide
> > recommendations, I suggest we follow them.

> http://avalon.apache.org/community/process/code-standards.html

That is a good start, which I presume has its roots in Jakarta days. So I skip 
these (=take them as 'decided') and concentrate on explaining ALL the other 
possibly smaller items.


Niclas
-- 
+---------//-------------------+
|   http://www.bali.ac         |
|  http://niclas.hedhman.org   |
+------//----------------------+

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


Re: [Proposal] Unified code format by Jalopy

Posted by Stephen McConnell <mc...@apache.org>.
Niclas Hedhman wrote:
> Gang,
> 
> I would like to suggest that we introduce Jalopy to enforce code formatting.
> 
> This means that we define and agree upon a set of formatting rules, and place 
> that into the a Jalopy definition file, and that this is executed against all 
> our sources at regular intervals (such as after a change).
> Maven supports Jalopy out of the box, so it is just a matter of running Maven 
> with a jalopy target, but we need the definitions established first.
> 
> The "definition" includes all the gritty details on code format, such as "open 
> brace placements", "space after paranthesis", "space around operators", 
> "maximum length of line", "break line after operator" and so on, and so on...
> 
> Although we all have to "adjust" to some extent, I think we will all benefit 
> from it in the long run. If there are Apache or Jakarta wide recommendations, 
> I suggest we follow them.
> 
> I volunteer to set it all up, and explain all the individual settings that we 
> have to agree upon.
> 
> What do you all think?

http://avalon.apache.org/community/process/code-standards.html

Steve.

> Niclas
> 


-- 

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

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