tags:

views:

244

answers:

3

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up.

I am basically looking for something to take code written by two people, and clean it up to a standardized style. Does such an app exist?

Thanks a bunch!

A: 

Of course I find an answer to my own question moments later. What luck, I probably spent an hour searching earlier.

Should anyone be looking for the same thing, check out Uncrustify at http://uncrustify.sourceforge.net/

Cody
The 'remove {} on single statement after if, for, etc..' is a no-go for me. That makes maintenance risky.
Matthieu M.
Of course, it's configurable; you can easily turn that option off...
MattyT
+3  A: 

Artistic Style

is a source code indenter, formatter, and beautifier for the C, C++, C# and Java programming languages.

GC Great Code

is a well known C/C++ source code beautifier.

Cristian Adam
A: 

If you're using Visual Studio then you could take a look at StyleManager*. It's a VS add-in that makes it easy to set up formatting styles and apply them to code whenever you need to. It's a popular choice with VS users, and in particular was used by the DirectX SDK team to tidy up their sample code.

*Huge disclaimer: I'm one of the authors of this software, so apologies for the shameless plug!

Nik