1

What config settings can I make of use of to make uncrustify format like the the expected output for ObjC++ code.

Input:

SomeObject *buildObject()
{
  return
    BuildObject(^(CKComponent *) {
    [[[Object alloc]
      initWithLogger:[Logger new]
      async:YES]
     copy];
  });
}

✅Expected Output:

SomeObject *buildObject()
{
  return
    BuildObject(^(CKComponent *) {
      [[[Object alloc]
        initWithLogger:[Logger new]
        async:YES]
       copy];
    });
}

❌Actual Output:

SomeObject *buildObject()
{
  return
    BuildObject(^(CKComponent *) {
    [[[Object alloc]
      initWithLogger:[Logger new]
      async:YES]
     copy];
  });
}

Config options used:

indent_off_after_return_new = true
indent_single_after_return = false
indent_oc_block = false
indent_continue = 0
use_indent_continue_only_once = true

KSC
  • 406
  • 1
  • 6
  • 8

0 Answers0