I've just taken over a large, poorly formatted mass of C++ code. I'm looking for a code prettifier with two specific features.
Remove superfluous access modifiers
Clean up white space in a nice way. eg. leave blank lines between functions, collapse multiple blank lines into one within functions, remove blank lines between the opening/closing brace of a function and the start/end of the code.
This is a typical example. I don't want to have to write one, it'd take too long to prove that it couldn't damage the code and there's way too much to check by eye.
class CLASS_DECL_BASE OComStorage : public OBase
{
private:
protected:
public:
OComStorage (void );
~OComStorage (void );
void Thanks_Guys();
See artistic style. I've used it on a medium-sized code-base without creating any problems. It can do a variety of source transforms on whitespace, indentation and so on.
Just make sure you back up your code (source control) while you experiment with the many, many options. The defaults are somewhat surprising...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With