From 9169028e5744ebd9c74c0c44de4d68db910e6eab Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Mon, 28 Feb 2022 01:00:52 +0100 Subject: [PATCH] Add `.clang-format` Should not be followed for C files, to avoid mucking `blame`s, but will be applied during the gradual C++ rollout, since that will likely touch most lines in the codebase anyway. --- .clang-format | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.rst | 6 ++++ 2 files changed, 105 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..ded39b96 --- /dev/null +++ b/.clang-format @@ -0,0 +1,99 @@ +AccessModifierOffset: -4 +AlignAfterOpenBracket: Align +AlignArrayOfStructures: Left +AlignConsecutiveAssignments: None +AlignConsecutiveBitFields: Consecutive +AlignConsecutiveDeclarations: None +AlignConsecutiveMacros: Consecutive +AlignEscapedNewlines: Left +AlignOperands: Align +AlignTrailingComments: false +AllowShortBlocksOnASingleLine: Empty +AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: InlineOnly +AllowShortIfStatementsOnASingleLine: Never +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: Yes +AttributeMacros: + - format_ + - attr_ +BinPackArguments: true +BinPackParameters: true +BitFieldColonSpacing: Both +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Attach +BreakBeforeConceptDeclarations: true +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: AfterComma +BreakStringLiterals: true +ColumnLimit: 100 +CompactNamespaces: false +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DeriveLineEnding: true +DerivePointerAlignment: false +EmptyLineBeforeAccessModifier: Leave +FixNamespaceComments: false +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^