[Question]: Any tools to automatically format existing code base to a particular format?
-
So that me and my team can be even more lazy ? ;)
-
I only know of "astyle":http://astyle.sourceforge.net/. You can tweak almost everything there. I'm unsure to which degree it should be "automatic", but I'm sure it can at least be hooked into some save routine in popular IDEs.
-
thanks volker, before I start looking into it, any idea if its been tried with creator
-
It would not surprise me if someone already wrote a Creator plugin for astyle. Oh.... someone has: http://astyleplugin.berlios.de/. I don't know of any built in solution for Creator.
-
This looks a bit like "some other thread":http://developer.qt.nokia.com/forums/viewthread/3364
I did recommend astyle, the astyle plugin and a UI for astyle and others there.
-
Thanks Tobias, I searched and somehow didn't find that thread ... I will chk this out further.
What about the cpp code formatter available with CDT on eclipse? Anyone with feedback on that?
-
Chetankjain: I guess the formatter from eclipse will also work. I never used that though, I generally found eclipse just too bloated for my taste and never got into it:-(
-
Tobias/Others: Could you specify which style of cpp coding Qt uses ...
Options:
a. K&R
b. BSD/Allman
c. GNU
d. Whitesmiths -
Chetan, in case you didn't know already, they have documented it on the "QtCoding Style":http://qt.gitorious.org/qt/pages/QtCodingStyle page on gitorious. Unfortunately they don't state what's the base style (if there is any).
Another good page is that on "Coding Conventions":http://qt.gitorious.org/qt/pages/CodingConventions
-
yes Volker I've seen the Coding Style and Conventions page, was curious to find if the base style was mentioned anywhere else. Else probably have to manually find out :)