1

How do I prevent uncrustify from aligning my method definitions on the end paren?

I have this interface file

@import UIKit;

@protocol MyProtocol <NSObject>

@required
- (BOOL)isEditing;
- (BOOL)isValid;
- (NSInteger)numberOfItems;
- (id<MyItemProtocol>)itemAtIndex:(NSInteger)index;
- (NSDictionary*)toDictionary;

@end

And uncrustify aligns all the methods on the end paren like this:

@import UIKit;

@protocol MyProtocol <NSObject>

@required
- (BOOL)              isEditing;
- (BOOL)              isValid;
- (NSInteger)         numberOfItems;
- (id<MyItemProtocol>)itemAtIndex:(NSInteger)index;
- (NSDictionary*)     toDictionary;

@end

Which option can I set to prevent this?

It might be worth noting that if there is a newline between each method then uncrustify does not try to align them.

Jonathan Beebe
  • 5,241
  • 3
  • 36
  • 42

0 Answers0