Search code examples
objective-cuncrustify

Uncrustify ObjC newline after method


Is there a way with Uncrustify to add a new line between method declarations and the open brace, similar to nl_fcall_brace, but for ObjC methods?

- (void)addPendingBuddyRequests:(NSArray *)requests {
}

vs.

- (void)addPendingBuddyRequests:(NSArray *)requests
{
}

Solution

  • i think you can use the following option for this:

    # Add or remove newline between function signature and '{'
    nl_fdef_brace                            = force   # ignore/add/remove/force