Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an Uncrustify config for Google's Objective-C style?

Is there a config file for Uncrustify that will format Objective-C per Google's Objective-C style guide?

Example config files for Uncrustify look a bit daunting and I'm hoping that I won't need to build one from scratch...

like image 867
a paid nerd Avatar asked Dec 12 '11 21:12

a paid nerd


2 Answers

I wanted to incorporate uncrustify into my automated builds but faced problems. I found an alternative that I'm happy with. The AppCode objective-C IDE from Jetbrains works as a supplemental IDE to Xcode.

It includes an excellent and highly configurable code formatting tool, among other things.

enter image description here

. . . to my knowledge you can't invoke this tool from the cmd-line, however I've just filed a feature request to do so.

If you prefer Uncrustify there's a GUI Tool that might help.

like image 176
Jasper Blues Avatar answered Nov 10 '22 03:11

Jasper Blues


That config file seems daunting only in length... (I've seen much worse!) I don't know if it conforms to the Google style guide, but mmorris posted his .cfg in this answer: https://stackoverflow.com/a/7321776/18961

You don't want to strictly conform to the Google style anyway... it only uses two character indentation! ;)

like image 41
livingtech Avatar answered Nov 10 '22 02:11

livingtech