Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.03 KB

clang-format.md

File metadata and controls

26 lines (18 loc) · 1.03 KB

Code formatting tools

Objective-C and clang-format

We use clang-format to automatically format our Objective-C code. If you're going to be contributing more than a few one-off patches, then to reduce the time it takes to reveiw code, we suggest installing clang-format as an Xcode plugin and have it format your code whenever you write to disk.

Installing clang-format

You can install clang-format via Brew by running scripts/install/install_clang_format.

Installing the Xcode plugin

You can install Travis Jeffery's clang-format Xcode plugin by following his installation instructions.

Once you've installed it configure it in Xcode:

  1. Edit > Clang Format > File to use MDC's particular clang-format configuration file.
  2. Edit > Clang Format > Use System ClangFormat to ensure that you're using the same version of clang-format as we are.