jer...@wickettraining.com wrote:
> 
> 1 - formatting CAN break code (I know it doesn't usually, but can),
> 

We have done post-commit-hook-formatting on a big project and luckily never
had a code break. But theoretically you're absolutely right.



> 2 - the statement that "everyone can format how he or she likes" is FALSE.
>  If I check-in my 16-char tabulation file and you check in your
> 2-tab-per-tab-tabulation file, and both are transformed to
> three-spaces-two-commas-and-a-pipe formatting (yes, I'm making that stuff
> up).... when I check out my file, I get the re-formatted version, and so
> does two-tab guy.  So NEITHER of us is working with the same format we
> like
> / checked in.
> 

I think we have a misunderstanding here. If I checkin my code then it is
reformatted by the commit-hook and I get back the formatted code in my
workspace immediately (like with expanding those CVS variables you can embed
in your code). This way the history only shows the changes I really made and
there is no mess up of the history because of changes caused by formatting.

Anyhow, with commit-hook-formatting we made very good experience. Developers
really can format the way they like, or at least do not need to bother at
all with plugins, settings, etc. As soon as they checkin, their code is
formatted on the server *and* in their workspace.



> when I check out my file, I get the re-formatted version, and so
> does two-tab guy.  So NEITHER of us is working with the same format we
> like
> 

No, you get the re-formatted version when you check in. You don't care about
formatting until checkin. No need to make sure the formatting is conform the
rules. commit-hook takes care about that. That's the only difference.


-----
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicketstuff-1-5-Code-formatting-tp3432552p3435345.html
Sent from the Forum for Wicket Core developers mailing list archive at 
Nabble.com.

Reply via email to