Version Control and Coding Formatting
Posted
by Martin Giffy D'Souza
on Stack Overflow
See other posts from Stack Overflow
or by Martin Giffy D'Souza
Published on 2010-04-06T22:13:14Z
Indexed on
2010/04/06
22:23 UTC
Read the original article
Hit count: 389
tortoisesvn
|subversion
Hi,
I'm currently part of the team implementing a new version control system (Subversion) within my organization. There's been a bit of a debate on how to handle code formatting and I'd like to get other peoples opinions and experiences on this topic.
We currently have ~10 developers each using different tools (due to licensing and preference). Some of these tools have automatic code formatters and others don't.
If we allow "blind" checkins the code will look drastically different each time someone does a check in. This will make things such as diffs and merges complicated.
I've talked to several people and they've mentioned the following solutions:
- Use the same developer program with the same code formatter (not really an option due to licensing)
- Have a hook (either client or server side) which will automatically format the code before going into the repository
- Manually format the code.
Regarding the 3rd point, the concept is to never auto-format the code and have some standards. Right now that seems to be what we're leaning towards. I'm a bit hesitant on that approach as it could lead to developers spending a lot of time manually formatting code.
If anyone can please provide some their thoughts and experience on this that would be great.
Thank you,
Martin
© Stack Overflow or respective owner