Jump to content
  • Advertisement
Sign in to follow this  
circuncidador

Subversion and pre-commit code validation

This topic is 3893 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi... I'm managing a huge c++ project, and i was wondering if there is some way to automatically check the coding style (e.g. non public members, "m_" before all the attributes, etc.. ) on .cpp and .h files before these are commited on a subversion system ( svn ). any suggestions? thanks in advance... Jose.

Share this post


Link to post
Share on other sites
Advertisement
Tell your team to do it?

Have a code review policy?

I think this is a management issue. You can't make a code checker which will enforce every aspect of your coding guidelines (as many of them will be subjective anyway).

If you think there is a problem with the quality of code produced, get each sub-project to work on their own branch and insist on a code review before it's merged into the trunk. Or something.

Mark

Share this post


Link to post
Share on other sites
Certainly, have an engineer or two write a program that parses the code and checks for all the things you don't want to let through. If the program catches something, disallow the commit and have it send an email to the developer stating what the error was.

There are already some programs that do this sort of thing (LINT comes to mind). In most cases you'll still have to write some Perl/shell scripts to do the "if LINT generated errors, disallow the commit" step.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!