Pregunta

I'm having problems with my -rather extense- Uncrustify Configuration. I'm using Xcode to auto-run Uncrustify.

For some reason, Uncrustify seems to add a Space before the closing Brace of a block declaration.

Sample Input

 [_collectionView performBatchUpdates:nil completion:^(BOOL finished) {
 }];

Sample Output (note the forced space before the closing Brace)

 [_collectionView performBatchUpdates:nil completion:^(BOOL finished) {
  }];

Desired Output

 [_collectionView performBatchUpdates:nil completion:^(BOOL finished) {
 }];

How can I fix this?

¿Fue útil?

Solución

Ok, so I did find a solution for this.

I ended up using the following parameter in my uncrustify.cfg

indent_oc_block_msg_xcode_style = true

Got this tip by asking in the Source Forge project website (after a week or so).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top