Code Monkey home page Code Monkey logo

uncrustify-config-ios's Introduction

uncrustify config for iOS developer

What is it

Uncrustify make code formatting beautiful. It needs configrations, I couldn't find a good configuration for iOS developer on Objective-C.

Here's a repo collecting pretty uncrustify config for iOS developer.

You can distribute your configurations over pull request.

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 --HEAD
git clone https://github.com/dijkst/uncrustify-config-ios.git ~/.uncrustify

Custom

Default settings disable the alignment of continued assignment or variable definition. If you need them, just set align_assign_span, align_var_def_span and align_oc_msg_spec_span to 1.

Example

align code (unsupported, please read Custom):

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.

uncrustify-config-ios's People

Contributors

whirlwind avatar majie1993 avatar

Watchers

James Cloos avatar Jack Yin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.