cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: svn commit: r554234 [1/2] - in /cocoon/trunk/blocks/cocoon-lucene/cocoon-lucene-impl/src: changes/ main/java/org/apache/cocoon/components/search/ main/java/org/apache/cocoon/generation/ main/java/org/apache/cocoon/samples/ main/resources/META-INF/cocoo...
Date Tue, 10 Jul 2007 14:41:41 GMT
Felix Knecht pisze:
>> <snip what="real changes and formatting mishmash"/>
>>
>> Felix, first of all I'm grateful for your contributions and I'm feeling
>> bad that I have to bring this issue again.
> 
> Just do it. I don't mind and it's part of OSS that codereviewing is done!
> My problem is just doing code formatting quite automatically before
> committing. 

Other very important habit is to review your changes _before_ making commit so you can spot
that too much changes are going to be committed 
and do something with it.

I'm not against code formatting (I used to reformat code myself) but I would like to see it
in separate commit clearly stating it's only 
about adjusting formatting. What's more, it's usually better to commit reformatting changes
before you start to play with piece of code. If 
you do it in other order your reformatting commit message will overlap the previous one that
is the only worth to be seen.

> I really thought I have now the right settings for Java-Code
> and for XML-Code. For me it sounds logical (because of course all others
> before me also kept to these formatting rules ;-) ) that it should be
> possible to do it this way without trapping into this formatting stuff
> again - and I really don't want to do it manually now adays.
> Maybe I should just first commit my stuff without any formattings (just
> the way I wrote it down) and then afterwards do another commit
> formatting applied ?

No, exactly opposite order should be chosen, see above.

> I don't see any other way when I don't want to so the formatting
> manually during changing the code (and manually isn't state of the art
> IMO). Do you have any other idea/way of doing it?

Isn't your IDE apply formatting to the new code you write according to your settings? I thought
that you only have to reformat the code that 
you have _not_ touched.

> OTH when we want to take care about this we really should think about
> reformatting once the whole code with a well defined format (which can
> be downloaded at the apache-cocoon site) and have templates at least for
> the probably most used IDE's by cocoon developers (like Eclipse,
> NetBeans, ?).

+1000 for having codified rules and templates but please don't do any revolution with existing
code. Evolution (gradual but constant) is 
much easier to handle.

WDYT?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Mime
View raw message