Re:Articulate Coding
by apaprocki on Sunday October 09, 2011 @11:10AM
(#3090573)
A good idea is to check for certain style issues which you want to enforce and are easy to catch at checkin time. You can enforce things like no real tabs, line width, no trailing spaces, etc and make the person checking in the code get rid of it. Usually once it winds up in VCS[1], it is harder to go back and clean it up. People make mistakes all the time, and tools are scriptable.
[1] Or do it at merge time if your setup involves pushing to a "work" repo which is merged to the real codebase later.
Re:Articulate Coding
by pmiller2 on Sunday October 09, 2011 @07:54PM
(#3091690)
I'd argue that if it's so easy to check you can do so with a commit hook, you should also automate fixing it. If you're using C, C++, C#, or Java, you can do this with astyle pretty easily, for instance.
[1] Or do it at merge time if your setup involves pushing to a "work" repo which is merged to the real codebase later.