Search code examples
objective-cformattinguncrustify

Uncrustify: Space between function name and brace at end of line


If I have a function like this:

- (id)init {
    self = [super init];
    if(self){

    }
    return self;
}

and I want uncrustify to output this:

- (id)init{
    self = [super init];
    if(self){

    }
    return self;
}

What options would I need to set? I can't seem to find a brace option for the end of the function name. I've noticed that it will add a space there, but I can't find the option that's doing it.


Solution

  • It looks like

    sp_fparen_brace remove

    Should do it according to this: http://uncrustify.sourceforge.net/config.txt