[Question]: Any tools to automatically format existing code base to a particular format?
-
wrote on 31 Jan 2011, 09:41 last edited by
So that me and my team can be even more lazy ? ;)
-
wrote on 31 Jan 2011, 10:28 last edited by
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.
-
wrote on 31 Jan 2011, 10:54 last edited by
thanks volker, before I start looking into it, any idea if its been tried with creator
-
wrote on 31 Jan 2011, 11:02 last edited by
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.
-
wrote on 31 Jan 2011, 17:58 last edited by
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.
-
wrote on 1 Feb 2011, 07:08 last edited by
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?
-
wrote on 1 Feb 2011, 08:50 last edited by
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:-(
-
wrote on 1 Feb 2011, 11:45 last edited by
Tobias/Others: Could you specify which style of cpp coding Qt uses ...
Options:
a. K&R
b. BSD/Allman
c. GNU
d. Whitesmiths -
wrote on 1 Feb 2011, 11:50 last edited by
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
-
wrote on 1 Feb 2011, 11:57 last edited by
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 :)
1/10