[英]Why is Uncrustify forcing a space before my Objective-C block closing brace?
I'm having problems with my -rather extense- Uncrustify Configuration . 我遇到了我的问题 - Uncrustify配置问题 。 I'm using Xcode to auto-run Uncrustify.
我正在使用Xcode自动运行Uncrustify。
For some reason, Uncrustify seems to add a Space before the closing Brace of a block declaration. 出于某种原因,Uncrustify似乎在块声明的关闭Brace之前添加了一个Space。
Sample Input 样本输入
[_collectionView performBatchUpdates:nil completion:^(BOOL finished) {
}];
Sample Output (note the forced
space before the closing Brace) 样品输出 (注意关闭支撑前的
forced
空间)
[_collectionView performBatchUpdates:nil completion:^(BOOL finished) {
}];
Desired Output 期望的输出
[_collectionView performBatchUpdates:nil completion:^(BOOL finished) {
}];
How can I fix this? 我怎样才能解决这个问题?
Ok, so I did find a solution for this. 好的,所以我找到了解决方案。
I ended up using the following parameter in my uncrustify.cfg
我最终在我的
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). 通过在Source Forge项目网站询问(一周左右)得到这个提示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.