From e876658410d57c52d42378441a5f7797f2a0512e Mon Sep 17 00:00:00 2001 From: bdm-oslandia Date: Thu, 13 Feb 2025 10:55:09 +0100 Subject: [PATCH] fix: add exhautive clang format options In order to be compliant with QtCreator, the .clang-format needs to have all the options set. --- .clang-format | 174 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 135 insertions(+), 39 deletions(-) diff --git a/.clang-format b/.clang-format index 45c6af05e0a6..081f70bc45e9 100644 --- a/.clang-format +++ b/.clang-format @@ -1,123 +1,219 @@ -Language: Cpp +--- +Language: Cpp AccessModifierOffset: -2 AlignAfterOpenBracket: BlockIndent -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false +AlignArrayOfStructures: None +AlignConsecutiveAssignments: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + PadOperators: false +AlignConsecutiveBitFields: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + PadOperators: false +AlignConsecutiveDeclarations: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + PadOperators: false +AlignConsecutiveMacros: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + PadOperators: false AlignEscapedNewlines: Left -AlignOperands: true -AlignTrailingComments: true +AlignOperands: Align +AlignTrailingComments: + Kind: Always + OverEmptyLines: 0 AllowAllArgumentsOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: true AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: Never AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: No BinPackArguments: true BinPackParameters: true +BitFieldColonSpacing: Both BraceWrapping: - AfterCaseLabel: true - AfterClass: true + AfterCaseLabel: true + AfterClass: true AfterControlStatement: true - AfterEnum: true + AfterEnum: true AfterExternBlock: true - AfterFunction: true - AfterNamespace: true + AfterFunction: true + AfterNamespace: true AfterObjCDeclaration: false - AfterStruct: true - AfterUnion: true - BeforeCatch: true - BeforeElse: true - IndentBraces: false + AfterStruct: true + AfterUnion: true + BeforeCatch: true + BeforeElse: true + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false +BreakAfterAttributes: Never +BreakAfterJavaFieldAnnotations: false +BreakArrays: true BreakBeforeBinaryOperators: All +BreakBeforeConceptDeclarations: Always BreakBeforeBraces: Custom BreakBeforeInheritanceComma: false BreakBeforeTernaryOperators: true BreakConstructorInitializers: BeforeComma -BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true ColumnLimit: 0 -CommentPragmas: '^ IWYU pragma:' +CommentPragmas: "^ IWYU pragma:" CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 2 Cpp11BracedListStyle: true DerivePointerAlignment: false -DisableFormat: false +DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true IncludeCategories: - - Regex: '^