I am currently participating in a team implementing a new version control system (Subversion) in my organization. There was a bit of debate about how to handle code formatting, and I would like to get other people's opinions and experiences on this topic.
Currently, we have ~ 10 developers who use different tools (due to licensing and preference). Some of these tools have automatic code formatting, while others do not.
If we allow blind checks, the code will look radically different every time someone checks. This will make things like diffs and merging difficult.
I spoke with several people and they mentioned the following solutions:
- Use the same developer program with the same code formatting (in fact, this is not an option due to licensing)
- Take a hook (client or server) that will automatically format the code before entering the repository
- Manually format the code.
Regarding point 3, the concept is to never format the code and not have any standards. Now it is similar to what we are inclined to. I have little doubt about this approach, as this can lead to the fact that developers will spend a lot of time manually formatting the code.
If someone can provide some of their thoughts and experiences, that would be great.
Thanks,
Martin
source share