Re: Source formatting issues while maintaining code

"Nat Pryce" <[email protected]> Sun, 23 Nov 2008 17:38:41 +0000
Newsgroups gmane.comp.programming.language-of-the-year
Message-ID <[email protected]>
2008/11/23 Tushar Joshi <[email protected]>:
> The editor features like Auto formatting the code like in Eclipse and
> NetBeans mess up the diff program and hence we have made a policy not
> to use any auto formatting tool on any code which is already committed
> to the CVS.
>
> I want your views about handling any similar issues with old code
> base.

If the existing source is badly formatted, then you could, as
suggested, impose a short code-freeze, reformat all the code
automatically, commit all the changes, and then end the code-freeze.

Alternatively, you could have a project policy that any commit must
contain either a reformat or code changes, but never both.

If the code has a consistent, but non-standard, formatting convention
then you could configure your IDE to follow that convention, so that
automatic reformats don't radically change what is being committed.

--Nat