johndoran / uncrustify-config-ios

uncrustify config for iOS developer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My uncrustify config

uncrustify config for a typical ios project

Requirements

  1. Tested with Xcode 4.6+ (also works in Xcode 5) on OS X 10.7 or higher.
  • Uncrustify 0.60 higher (0.60 has a bug for Objective-C block, so install master HEAD or higher in the future)
  • BBUncrustifyPlugin-Xcode

Installation

  1. using HomeBrew install Uncrustify
brew install uncrustify --HEARD
git clone https://github.com/dijkst/uncrustify-config-ios.git ~/.uncrustify

Example

align code:

before:

NSString *const BBUncrustifyOptionEvictCommentInsertion = @"evictCommentInsertion";
NSString *const BBUncrustifyOptionSourceFilename = @"sourceFilename";
NSString *const BBUncrustifyOptionSupplementalConfigurationFolders = @"supplementalConfigurationFolders";

after:

NSString *const BBUncrustifyOptionEvictCommentInsertion            = @"evictCommentInsertion";
NSString *const BBUncrustifyOptionSourceFilename                   = @"sourceFilename";
NSString *const BBUncrustifyOptionSupplementalConfigurationFolders = @"supplementalConfigurationFolders";

remove space:

before:

-( void )viewWillEnter ;

after:

- (void)viewWillEnter;

insert newline between methods

- (void)a {
}
- (void)b{
}

after:

- (void)a {
}

- (void)b {
}

and so on.

License

uncrustify-config-ios is available under the MIT license.

About

uncrustify config for iOS developer