szaszm commented on code in PR #1876: URL: https://github.com/apache/nifi-minifi-cpp/pull/1876#discussion_r1793454405
########## .clang-format: ########## @@ -0,0 +1,67 @@ +BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: None +AlignOperands: DontAlign +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: Always +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterReturnType: None +BreakTemplateDeclarations: Yes +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +ColumnLimit: 200 +CompactNamespaces: false +ContinuationIndentWidth: 4 +IndentCaseLabels: true +IndentPPDirectives: None +IndentWidth: 2 +InsertBraces: true +KeepEmptyLinesAtTheStartOfBlocks: true Review Comment: ```suggestion KeepEmptyLinesAtTheStartOfBlocks: false ``` ########## .clang-format: ########## @@ -0,0 +1,67 @@ +BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: None +AlignOperands: DontAlign +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: Always +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterReturnType: None +BreakTemplateDeclarations: Yes +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +ColumnLimit: 200 +CompactNamespaces: false +ContinuationIndentWidth: 4 +IndentCaseLabels: true +IndentPPDirectives: None +IndentWidth: 2 +InsertBraces: true +KeepEmptyLinesAtTheStartOfBlocks: true +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: false +PenaltyIndentedWhitespace: 1 Review Comment: what is this "penalty"? The official docs didn't make it any more clear. If we don't know, I'd remove it. ```suggestion ``` ########## .clang-format: ########## @@ -0,0 +1,67 @@ +BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: None +AlignOperands: DontAlign +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: Always +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterReturnType: None +BreakTemplateDeclarations: Yes +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false Review Comment: This should result in the same outcome: ```suggestion BreakBeforeBraces: Attach ``` ########## .clang-format: ########## @@ -0,0 +1,67 @@ +BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: None +AlignOperands: DontAlign +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false Review Comment: I'd not change constructor initializer lists, because different ones look good differently. Maybe removing this option has this effect? ```suggestion ``` ########## .clang-format: ########## @@ -0,0 +1,67 @@ +BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: None +AlignOperands: DontAlign +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: Always +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterReturnType: None +BreakTemplateDeclarations: Yes +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterUnion: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +ColumnLimit: 200 +CompactNamespaces: false +ContinuationIndentWidth: 4 +IndentCaseLabels: true +IndentPPDirectives: None +IndentWidth: 2 +InsertBraces: true +KeepEmptyLinesAtTheStartOfBlocks: true +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: false +PenaltyIndentedWhitespace: 1 +PointerAlignment: Left +ReferenceAlignment: Left +ReflowComments: false +SpaceAfterCStyleCast: true Review Comment: I'd change this to false, we're usually not adding the space to C-style casts. (But we're usually not using them anyway) ```suggestion SpaceAfterCStyleCast: false ``` ########## .clang-format: ########## @@ -0,0 +1,67 @@ +BasedOnStyle: Google +AccessModifierOffset: -1 +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: None +AlignOperands: DontAlign +AllowAllArgumentsOnNextLine: false Review Comment: I wouldn't restrict this either ```suggestion ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
