From b33d74c4efed0a48a52b7f2b27358364e1fa714c 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 +