new clang format params

This commit is contained in:
Sean Darcy 2023-03-24 04:47:24 +00:00 committed by Jason Rhinelander
parent 6b662f1f5f
commit 97aa52ed4e
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
2 changed files with 43 additions and 47 deletions

View File

@ -1,56 +1,50 @@
BasedOnStyle: Google BasedOnStyle: Google
AlignAfterOpenBracket: AlwaysBreak AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: 'false' AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: 'false' AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: 'true' AlignEscapedNewlines: Left
AlignOperands: 'false' AlignOperands: AlignAfterOperator
AlignTrailingComments: 'true' AlignTrailingComments: true
AllowShortBlocksOnASingleLine: 'false' AllowAllArgumentsOnNextLine: true
AllowShortCaseLabelsOnASingleLine: 'false' AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: None AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: 'false' AllowShortCaseLabelsOnASingleLine: true
AllowShortLoopsOnASingleLine: 'false' AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakAfterDefinitionReturnType: All AllowShortIfStatementsOnASingleLine: false
AlwaysBreakAfterReturnType: All AllowShortLambdasOnASingleLine: All
AlwaysBreakTemplateDeclarations: 'true' AllowShortLoopsOnASingleLine: false
BreakBeforeBinaryOperators: NonAssignment AlwaysBreakAfterReturnType: None
BreakBeforeBraces: Custom AlwaysBreakTemplateDeclarations: Yes
BraceWrapping: AlwaysBreakBeforeMultilineStrings: true
AfterCaseLabel: true BreakBeforeBinaryOperators: None
AfterClass: true BreakBeforeBraces: Attach
AfterControlStatement: true BreakBeforeTernaryOperators: true
AfterEnum: true BreakConstructorInitializers: AfterColon
AfterFunction: true Cpp11BracedListStyle: true
AfterNamespace: true KeepEmptyLinesAtTheStartOfBlocks: true
AfterObjCDeclaration: true NamespaceIndentation: Inner
AfterStruct: true CompactNamespaces: true
AfterUnion: true PenaltyBreakString: 3
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializersBeforeComma: 'true'
Cpp11BracedListStyle: 'true'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
NamespaceIndentation: All
PenaltyBreakString: '3'
SpaceBeforeParens: ControlStatements SpaceBeforeParens: ControlStatements
SpacesInAngles: 'false' SpacesInAngles: false
SpacesInContainerLiterals: 'false' SpacesInContainerLiterals: false
SpacesInParentheses: 'false' SpacesInParentheses: false
SpacesInSquareBrackets: 'false' SpacesInSquareBrackets: false
Standard: Cpp11 Standard: c++17
UseTab: Never UseTab: Never
SortIncludes: false SortIncludes: true
ColumnLimit: 100 ColumnLimit: 100
IndentWidth: 4
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
# treat pointers and reference declarations as if part of the type # treat pointers and reference declarations as if part of the type
DerivePointerAlignment: false DerivePointerAlignment: false
PointerAlignment: Left PointerAlignment: Left
# when wrapping function calls/declarations, force each parameter to have its own line # when wrapping function calls/declarations, force each parameter to have its own line
BinPackParameters: 'false' BinPackParameters: false
BinPackArguments: 'false' BinPackArguments: false

View File

@ -1,8 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
CLANG_FORMAT_DESIRED_VERSION=11 CLANG_FORMAT_DESIRED_VERSION=14
TARGET_DIRS=(src/wallet3 src/sqlitedb src/logging) TARGET_DIRS=(src pybind)
set -e
binary=$(which clang-format-$CLANG_FORMAT_DESIRED_VERSION 2>/dev/null) binary=$(which clang-format-$CLANG_FORMAT_DESIRED_VERSION 2>/dev/null)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then