4

How can I add newline after call to super with uncrustify

Current:

- (void)someFunction
{
   [super someFunction];
   more stuff;
   and more stuff;
}

Desired:

- (void)someFunction
{
   [super someFunction];

   more stuff;
   and more stuff;
}

And how can I add newline before and after interface declaration and implementation declaration

Current:

@interface SCLoginScreenViewController ()
@property (weak, nonatomic) IBOutlet UIView *someView;
@property (weak, nonatomic) IBOutlet UIView *anotherView;
@end
@implementation SCLoginScreenViewController
- (void)someFunction
{
}

Desired:

@interface SCLoginScreenViewController ()

@property (weak, nonatomic) IBOutlet UIView *someView;
@property (weak, nonatomic) IBOutlet UIView *anotherView;

@end

@implementation SCLoginScreenViewController

- (void)someFunction
{
}
  • I am using BBUncrustifyPlugin and UncrustifyX
Luda
  • 7,282
  • 12
  • 79
  • 139

1 Answers1

0

Unfortunately Uncrustify doesn't support any of these features at the moment.1

The only "new line after" options that are shown below.

(Two not included in the screenshot are: Newline count after variable definition block and Newline count after variable definition block not at the top of a function body)

enter image description here

There are some other options in the "newlines" section. But again, none of them match your case:

(Newline after while missing from screenshots)

enter image description here enter image description here


1. I'm using version2.1.1, I believe this is the latest

James Webster
  • 31,873
  • 11
  • 70
  • 114