From 717e2ed5c1661e58b2be0ab3cd2329eb18766ae9 Mon Sep 17 00:00:00 2001 From: doylet Date: Thu, 4 Jul 2024 16:09:54 +1000 Subject: [PATCH] Add oxen-core's .clang-format to repository --- .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..75dcc75 --- /dev/null +++ b/.clang-format @@ -0,0 +1,50 @@ + +BasedOnStyle: Google +AlignAfterOpenBracket: AlwaysBreak +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Left +AlignOperands: AlignAfterOperator +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: false +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +AlwaysBreakTemplateDeclarations: Yes +AlwaysBreakBeforeMultilineStrings: true +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Attach +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: AfterColon +Cpp11BracedListStyle: true +KeepEmptyLinesAtTheStartOfBlocks: true +NamespaceIndentation: Inner +CompactNamespaces: true +PenaltyBreakString: 3 +SpaceBeforeParens: ControlStatements +SpacesInAngles: false +SpacesInContainerLiterals: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: c++20 +UseTab: Never +SortIncludes: true +ColumnLimit: 100 +IndentWidth: 4 +AccessModifierOffset: -2 +ConstructorInitializerIndentWidth: 8 +ContinuationIndentWidth: 8 + + +# treat pointers and reference declarations as if part of the type +DerivePointerAlignment: false +PointerAlignment: Left + +# when wrapping function calls/declarations, force each parameter to have its own line +BinPackParameters: false +BinPackArguments: false