From 97124f582fe8eec3afc22a5a46a893254732b602 Mon Sep 17 00:00:00 2001 From: Gabriel Gouvine Date: Tue, 10 Oct 2023 17:43:14 +0200 Subject: [PATCH] Simple clang format file --- .clang-format | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..63e1fda0 --- /dev/null +++ b/.clang-format @@ -0,0 +1,86 @@ +Language: Cpp +BasedOnStyle: WebKit +AccessModifierOffset: 0 +AlignAfterOpenBracket: Align +AlignArrayOfStructures: Right +AlignConsecutiveAssignments: AcrossComments +AlignConsecutiveBitFields: Consecutive +AlignConsecutiveDeclarations: AcrossComments +AlignConsecutiveMacros: Consecutive +AlignEscapedNewlines: Left +AlignOperands: Align +AllowShortCaseLabelsOnASingleLine: true +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: OnlyFirstIf +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +BinPackArguments: false +BitFieldColonSpacing: Both +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: MultiLine + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterStruct: false + AfterExternBlock: false + BeforeElse: false + BeforeWhile: false + IndentBraces: false +BreakBeforeBinaryOperators: All +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeComma +ColumnLimit: 0 +ConstructorInitializerIndentWidth: 2 +ContinuationIndentWidth: 0 +Cpp11BracedListStyle: true +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: Leave +FixNamespaceComments: true +IncludeBlocks: Preserve +IndentAccessModifiers: true +IndentCaseBlocks: false +IndentCaseLabels: false +IndentExternBlock: AfterExternBlock +IndentPPDirectives: None +IndentWidth: 2 +KeepEmptyLinesAtTheStartOfBlocks: true +MaxEmptyLinesToKeep: 4 +NamespaceIndentation: All +PackConstructorInitializers: NextLine +PointerAlignment: Left +QualifierAlignment: Leave +ReferenceAlignment: Pointer +RemoveBracesLLVM: false +ReflowComments: false +SeparateDefinitionBlocks: Leave +SortIncludes: Never +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: Custom +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterFunctionDeclarationName: true + AfterFunctionDefinitionName: true + AfterOverloadedOperator: true + BeforeNonEmptyParentheses: false +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: true +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: Leave +SpacesInCStyleCastParentheses: false +SpacesInConditionalStatement: false +SpacesInParentheses: false +UseTab: Never