From eb4dec46c2607f8fed14d5b10fb44913f533db97 Mon Sep 17 00:00:00 2001 From: numzero Date: Wed, 4 Oct 2023 20:39:08 +0300 Subject: [PATCH] Add clang-format file, based on that from Minetest --- .clang-format | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..93e5adb2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,45 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +UseTab: Always +TabWidth: 4 +BreakBeforeBraces: Custom +Standard: c++17 +BraceWrapping: + AfterClass: true + AfterControlStatement: Never + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true + AfterUnion: true + BeforeCatch: false + BeforeElse: false +FixNamespaceComments: false +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false +AccessModifierOffset: -4 +ColumnLimit: 0 +AllowShortFunctionsOnASingleLine: InlineOnly +SortIncludes: Never +IncludeCategories: + - Regex: '^".*' + Priority: 2 + - Regex: '^<.*' + Priority: 1 +AlignAfterOpenBracket: DontAlign +ContinuationIndentWidth: 8 +ConstructorInitializerIndentWidth: 8 +BreakConstructorInitializers: AfterColon +AlwaysBreakTemplateDeclarations: Yes +NamespaceIndentation: None +PointerAlignment: Right +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInContainerLiterals: false +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false