shiablue / uncrustify-objc

Format Objective-C code with Uncrustify.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Format Objective-C code with Uncrustify.

License:MIT License


Languages

Language:Shell 100.0%