Menu

#525 bad indentation for code inside objective-C block given as argument

closed-fixed
2023-04-01
2019-04-11
itay bia
No

using the default configuration i receive wrong indentation for objective-C blocks given as a parameter to a method call.
changing to other styles (kr or mozilla) did not change the outcome.

-(void)test
{
    AlertController *alertController = [[AlertController alloc] init];
    [alertController doSomethingWithHandler:^(UITextField *textField) {
        textField.placeholder = @"User";
    }];
}

becomes:

-(void)test
{
    AlertController *alertController = [[AlertController alloc] init];
    [alertController doSomethingWithHandler:^(UITextField *textField) {
                        textField.placeholder = @"User";
                    }];
}

i would expect the first code not to change normally.

Discussion

  • André Simon

    André Simon - 2023-02-17
    • status: open --> open-accepted
    • assigned_to: André Simon
     
  • André Simon

    André Simon - 2023-03-05

    You can test a fix in the latest 3.2 beta 3 release.

     
  • André Simon

    André Simon - 2023-04-01
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.