From db5648ebc2b2bdb525317f69b3cbb892f82db6ed Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Sun, 9 Jun 2024 00:39:46 +0200 Subject: [PATCH] Add clang-format rules --- .clang-format | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..4e18f1c --- /dev/null +++ b/.clang-format @@ -0,0 +1,50 @@ +--- +BasedOnStyle: WebKit +AccessModifierOffset: "-4" +AlignAfterOpenBracket: Align +AlignEscapedNewlines: Left +AlignOperands: true +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: AllIfsAndElse +AllowShortLoopsOnASingleLine: true +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: false +BreakInheritanceList: BeforeComma +BreakStringLiterals: false +ColumnLimit: "120" +CommentPragmas: .* +ContinuationIndentWidth: "0" +DerivePointerAlignment: true +EmptyLineBeforeAccessModifier: Always +IncludeBlocks: Merge +IndentCaseLabels: true +IndentPPDirectives: BeforeHash +IndentWidth: "4" +IndentWrappedFunctionNames: true +KeepEmptyLinesAtEOF: true +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: "2" +NamespaceIndentation: All +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: false +PackConstructorInitializers: NextLine +PenaltyBreakAssignment: 20 +ReflowComments: false +SortIncludes: Never +SortUsingDeclarations: Never +SpaceAfterCStyleCast: true +SpaceAfterTemplateKeyword: false +SpaceBeforeRangeBasedForLoopColon: false +SpaceInEmptyBlock: false +SpacesInAngles: false +SpacesInContainerLiterals: false +Standard: Cpp11 +TabWidth: "4" +UseTab: ForIndentation +AllowAllConstructorInitializersOnNextLine: true +ConstructorInitializerAllOnOneLineOrOnePerLine: false +SpaceInEmptyParentheses: false +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false