forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: Automated formatting of Java files
Date Sat, 27 Aug 2005 00:28:54 GMT
Diwaker Gupta wrote:
> > I think that it is doing too much, e.g. aligning like this:
> >          this.processor     = null;
> >          this.parser        = null;
> 
> Ok, we can choose not to. I'll modify the config and add it to the
> repository sometime later tonight. Meanwhile, I really don't see why
> doing "too much" is a problem. Its an automated tool, its _trivial_ to
> change such things at a minute's notice. But I'll go with the
> majority, I'm not anal about cleanup conventions :-)

See my answer in the "formatting of XML files" thread.

> > 1 whitespace at end-of-line
> 
> Ok
> 
> > 2 tabs to four-space
> 
> Ok
> 
> > 3 indentation
> 
> Ok
> 
> > 4 organise imports
> 
> Ok. Jalopy can get fancy and explode imports (so instead of
> org.apache.forrest.* it will declare only those classes that are
> actually used) or it can collapse them (use foo.* instead of
> individual classes). Any preferences there or do I just leave them as
> it is?

At Cocoon we try to get the developer to define
only the classes they actually use.

People use their own tools to do that for the files
that they are working on. Cocoon doesn't do any
automated cleanup, but occasionally we will see a
committer do some cleanup.

I think that we should apply such cleanups.

> > 5 whitespace in java statements
> 
> This is vague. Are you talking about assignments? expressions?
> operators? brackets? space before? space after? An example would
> really  help :-)

It was a general statement to cover all those cases.
Your example showed many changes. In my opinion, too much.

However we don't have much java code and it doesn't
change very often, so i am less concerned about any
changes that you want to do here. XML is the bigger problem.

> > 6 aligned variable assignments
> 
> Subject to dev preferences I guess.
> 
> -- 
> Web/Blog/Gallery: floatingsun.net

Mime
View raw message