martinzink commented on code in PR #1876:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1876#discussion_r1793596703


##########
.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:
   This discourages the formatter to align the chained function calls without 
this the auto formatter pulls out the propertydefinitions to this
   ```
     EXTENSIONAPI static constexpr auto BatchSize = 
core::PropertyDefinitionBuilder<>::createProperty("Batch Size")
                                                        
.withDescription("Maximum number of flowfiles emitted in a single trigger. If 
set to 0 all new content will be processed.")
                                                        .isRequired(true)
                                                        
.withPropertyType(core::StandardPropertyTypes::UNSIGNED_INT_TYPE)
                                                        .withDefaultValue("0")
                                                        .build();
   ```
   with this, it will use the continuation identation
   ```
     EXTENSIONAPI static constexpr auto BatchSize =
         core::PropertyDefinitionBuilder<>::createProperty("Batch Size")
             .withDescription("Maximum number of flowfiles emitted in a single 
trigger. If set to 0 all new content will be processed.")
             .isRequired(true)
             .withPropertyType(core::StandardPropertyTypes::UNSIGNED_INT_TYPE)
             .withDefaultValue("0")
             .build();
   ```
   
   there is no explcit settings for this unfortuently but based on my 
experiments this greatly improves the autoformatter's output without noticeble 
downside



-- 
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]

Reply via email to