Last Updated: February 25, 2016
·
1.322K
· daij-djan

Automatic code formatting in the ios/osx workflow

Automatic code formatting in the ios/osx workflow: format code in the comfort of your IDE! All you need is the BBUncrustify plugin for xXode

Whenever you save a source file, it can be formatted automatically using the Uncrustify formatter or Clang itself.

homepage of the plugin:
https://github.com/benoitsan/BBUncrustifyPlugin-Xcode

latest binary at the time of writing:
https://github.com/benoitsan/BBUncrustifyPlugin-Xcode/releases/tag/2.0.2

to install the binary:
1. Unzip it
2. then copy UncrustifyPlugin.xcplugin to ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins.
3. Relaunch Xcode after the copy.

(About Uncrustify open source code formatter: http://uncrustify.sourceforge.net)
(About built-in ClangFormat: http://clang.llvm.org/docs/ClangFormat.html)