[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: coping with different coding styles

From: Dmitry Beransky <db01_at_dembel.org>
Date: 2005-12-02 00:15:32 CET

At 12:22 PM 12/1/2005, Robert P. J. Day wrote:
>and that was a mistake.

Yes, so far it looks like it was :) but only if I can't get Subversion to
work the way I want :)

>all that's going to accomplish is to allow your programmers to check
>in what code that they formatted *one* way, then have to deal with the
>reformatted code when they check it back out again.

There is really no "deal[ing] with" reformatted code. All it takes in
IntelliJ IDEA is pressing Alt+Ctrl+L, Enter and I have the code formatted
to my tastes and preferences. I'm sure reformatting code is not much more
involved in Eclipse or in any other modern IDE. So, really, taking the
issue of having to deal with Subversion aside, there is absolutely no good
reason to force anyone to getting used to putting the opening brace on a
new line or on the same line as the block marker or using 4 tab spaces vs.
3 or 2.

At 12:28 PM 12/1/2005, Peter Herth wrote:
>>Because in my eyes the only thing worse than an
>>unloved coding style is a random mix of coding styles.

Again, this is not an issue. A single press of a key or a button will
homogenize the style to your own in any good IDE.

At 01:32 PM 12/1/2005, Mark Shead wrote:
>way your coders have a simple way to format everything correctly and you
>can use a pre-commit hook and the checkstyle tool to reject any commits
>where they forgot to run the formatter.

Commits isn't the only place where different coding style may become a
problem. A diff between the working base and the working copy can also get
screwed up by reformatted code.

I understand that I may need to adopt a coding standard in order to be
compatible with Subversion. But that was exactly my question: is there a
way to make Subversion work the way I want? If the answer is an absolute
and definite 'No' then I'll have to change my ways. But then this smells
to me as the case of making a developer jump through hoops because tool
aren't flexible enough instead of having the tools making the developer's
life easier (not that Subversion hasn't eased our lives by so much already
:-), but we always want more).


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 2 00:37:16 2005

This is an archived mail posted to the Subversion Users mailing list.