Skip to content

ElfSundae/uncrustify-objc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

uncrustify-objc

Format Objective-C code with Uncrustify.

Installation

Clone or download this repository to a proper location, add the bin directory to the PATH for easy access:

export PATH="$PATH:/path/to/uncrustify-objc/bin"

Usage

uncrustify-objc dir [dir] [dir] ...

Examples:

$ cd ~/projects/awesome
$ uncrustify-objc .
$ uncrustify-objc /path/to/some/directory ~/iOSProject ~/CocoaProject

Xcode Extension

You may install XCFormat to format your code in Xcode. To let XCFormat use our Uncrustify config file:

  1. Replace the executable file uncrustify at /Applications/XCFormat.app/Contents/PlugIns/SourceExtension.appex/Contents/Resources
  2. Open XCFormat, click "Config" button under the "Uncrustify" tab, replace the config file uncrustify.cfg in the opened Finder

Contribution

Update the config file:

cd uncrustify
./uncrustify --update-config-with-doc -o uncrustify.cfg -c uncrustify.cfg