From 8c4832f71172db71eeea71dd91fe424382667ad9 Mon Sep 17 00:00:00 2001 From: h2zero Date: Thu, 18 Jul 2024 17:17:54 -0600 Subject: [PATCH] Add clang-format. --- .clang-format | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..57a0bea --- /dev/null +++ b/.clang-format @@ -0,0 +1,42 @@ +BasedOnStyle: Google +Language: Cpp +ColumnLimit: 120 +IndentWidth: 4 +TabWidth: 4 +UseTab: Never +SortIncludes: Never +PPIndentWidth : 1 +IndentPPDirectives: AfterHash +ReflowComments: true +SpacesBeforeTrailingComments: 1 +AlignTrailingComments: true +AlignAfterOpenBracket: Align +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: true + AcrossComments: true +AlignConsecutiveAssignments: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true + AlignCompound: true + PadOperators: true +AlignConsecutiveDeclarations: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true +AlignEscapedNewlines: Left +AccessModifierOffset: -2 +AlignArrayOfStructures: Right +AlignOperands: Align +AllowAllArgumentsOnNextLine: false +AllowShortFunctionsOnASingleLine: Inline +AllowShortBlocksOnASingleLine: Empty +BreakBeforeBinaryOperators: None +BinPackArguments: false +BinPackParameters: false +DerivePointerAlignment: false +PenaltyBreakAssignment: 4 +PenaltyExcessCharacter: 4 +PenaltyBreakBeforeFirstCallParameter: 1 +PointerAlignment: Left