[haiku-commits] Re: r33824 - haiku/trunk/src/servers/app

  • From: Brecht Machiels <brecht@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 29 Oct 2009 15:26:26 +0100

Brecht Machiels wrote:
Brecht Machiels wrote:
I know that for HTML there are tools (tidy for example) to clean up code. I'm sure there must be something similar for C++ code. It does have to be configurable to the Haiku guidelines though.

The following page lists a few tools:
http://www.softpanorama.org/Utilities/beautifiers.shtml#C++

Artistic Style[1] and GNU Indent[2] are probably the best candidates.

Indent is indeed not suited for C++. Astyle seems a bit limited with respect to customization. Uncrustify [1] seems to be the most versatile I've come across so far. I'm not sure how much of the coding guidelines violations it can fix. Indentation, wrapping, braces and spacings around operators seems to be possible. CamelCasing variable names and ordering includes is unlikely to be supported :)

UniversalIndentGUI [2] is a nice tool to see what the various tools do with the code.

Regards,
Brecht

[1] http://uncrustify.sourceforge.net/
[2] http://universalindent.sourceforge.net/



Other related posts: