ReactiveCocoa的ClangFormat样式

Río*_*ire 8 static-analysis objective-c clang reactive-cocoa clang-format

我正在使用ClangFormat.

我希望从中更新我的ReactiveCocoa代码的样式

   [[self.myService indexCase] subscribeNext:^(id response) {
        DDLogDebug(@"response : %@", response);
    }
        error:^(NSError *error) {
            [self.dataManager sendError:error];
        }];
Run Code Online (Sandbox Code Playgroud)

对此

  [[self.myService indexCase]
     subscribeNext:^(id response) {
        DDLogDebug(@"response : %@", response);
     } error:^(NSError *error) {
            [self.dataManager sendError:error];
        }];
Run Code Online (Sandbox Code Playgroud)

我应该考虑使用什么ClangFormat属性来实现这一目标?


我当前的.clang-format档案:

BasedOnStyle: WebKit
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
BreakBeforeBraces: Linux
ColumnLimit: 120
IndentCaseLabels: true
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
TabWidth: 4
UseTab: Never
Run Code Online (Sandbox Code Playgroud)

win*_*nux 0

添加这个:

AllowAllParametersOfDeclarationOnNextLine True
Run Code Online (Sandbox Code Playgroud)

或者

BinPackParameters True
Run Code Online (Sandbox Code Playgroud)