From 37c4b10c440a6a430df8b6dcec456fc69154e834 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 18 Mar 2024 13:31:03 -0700 Subject: [PATCH] Add clang format configuration Contemplate the configuration with: https://clang-format-configurator.site/ (cherry picked from commit 53fdcbca509b6c5dacaea3d3c465d86e49b0dd74) Change-Id: I5446fd45de2bf644e34112f719afb3318a440b30 --- .clang-format | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..41c73a3e5 --- /dev/null +++ b/.clang-format @@ -0,0 +1,51 @@ +--- +BasedOnStyle: LLVM +AccessModifierOffset: -4 +AlignAfterOpenBracket: BlockIndent +AlignEscapedNewlines: Left +AlignOperands: DontAlign +AllowShortBlocksOnASingleLine: Always +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: WithoutElse +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: false +BitFieldColonSpacing: None +BraceWrapping: + AfterCaseLabel: false + AfterClass: true + AfterControlStatement: MultiLine + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: true + AfterUnion: true + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: false + SplitEmptyNamespace: true +BreakAfterAttributes: Always +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Custom +BreakConstructorInitializers: BeforeComma +ColumnLimit: 100 +EmptyLineAfterAccessModifier: Leave +EmptyLineBeforeAccessModifier: Leave +FixNamespaceComments: false +IndentWidth: 4 +InsertBraces: true +InsertTrailingCommas: Wrapped +LambdaBodyIndentation: Signature +PackConstructorInitializers: CurrentLine +PointerAlignment: Middle +SortIncludes: Never +SpaceAfterCStyleCast: true +SpaceAfterTemplateKeyword: false +