[Mapserver-dev] Coding Standards

Norman Vine nhv at cape.com
Fri Feb 28 11:27:46 EST 2003


David Graham writes:
>
> Not sure how people feel about this, but I have been on projects where
> each night before the daily build the entire tree is checked out.
> "indent" is run with a set of project format rules. Then all the changes
> are committed (only those that indent changed the format on). Then the
> daily build is performed. And finally the unit tests are executed.
>
> This ensures that all code ends up in the same format. Developers do
> need to remember to update their CVS in the morning to get formatting
> changes. This is actually quite important, otherwise you find yourself
> doing a lot of CVS merge repairs (my biggest complaint of this
> technique). As a result programmers start programming more to the
> standard just to avoid problems with CVS merge failures.

If we want to use indent to enforce a common style, IMHO not a bad idea,
it is probably easier to set up a 'pre-commit' script on the server end that
runs indent on patched file at commit time.  This minimises the changes
seen by the CVS clients and eliminates the need to update Daily for possible
format changes.

The primary reason I like using indent in this fashion is it allows
individual
developers to use a local filter so that they can work on files in their
prefered
format

http://www.loria.fr/~molli/fom-serve/cache/347.html
http://www.gnu.org/manual/cvs/html_chapter/cvs_21.html

Cheers

Norman





More information about the mapserver-dev mailing list