我有以下代码,例如:
[cardRegistrationVC setCancelBlock:^{
[weakSelf.navigationController popViewControllerAnimated:YES];
}];
Run Code Online (Sandbox Code Playgroud)
当我对它应用clang格式时,它变成:
[cardRegistrationVC setCancelBlock:^{ [weakSelf.navigationController popViewControllerAnimated:YES]; }];
Run Code Online (Sandbox Code Playgroud)
如您所见,块内的代码出现在同一行.但我应该总是换上新的路线.
如何设置clang格式正确?我的以下设置文件:
BasedOnStyle: LLVM
AllowShortIfStatementsOnASingleLine: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
IndentCaseLabels: true
ColumnLimit: 120
ObjCSpaceAfterProperty: true
KeepEmptyLinesAtTheStartOfBlocks: true
PenaltyBreakString: 1000000
SpacesInContainerLiterals: false
Run Code Online (Sandbox Code Playgroud) 我正在处理非常大的项目,并且在几乎每次更改代码后都会出现“请稍候”消息,并显示“IntelliSense 和浏览信息已更新,请稍候”。text 和缓慢增加的数字包括正在处理 (x/150000) 几分钟的文件。
我的配置是否有问题,或者为什么该工具一次又一次地分析包含文件?