From 112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sun, 23 Apr 2023 23:36:42 -0400 Subject: Support features up to clang-format 14 Add .editorconfig Update C++ files within `extension/src` to follow .clang-format --- .clang-format | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to '.clang-format') diff --git a/.clang-format b/.clang-format index 8f3b82a..62a949f 100644 --- a/.clang-format +++ b/.clang-format @@ -1,13 +1,16 @@ --- +Language: Cpp UseCRLF: false Standard: c++20 UseTab: Always TabWidth: 4 -SpacesInParentheses: false +IndentWidth: 4 +ColumnLimit: 0 SpacesInSquareBrackets: false +SpacesInParentheses: false +SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: false SpacesInConditionalStatement: false -SpacesInCStyleCastParentheses: false SpacesInAngles: false SpaceInEmptyParentheses: false SpaceInEmptyBlock: false @@ -21,15 +24,36 @@ SpaceBeforeAssignmentOperators: true SpaceAfterTemplateKeyword: false SpaceAfterLogicalNot: false PointerAlignment: Left +PackConstructorInitializers: CurrentLine NamespaceIndentation: All -IndentWidth: 4 -Language: Cpp +LambdaBodyIndentation: Signature +IndentExternBlock: Indent IndentCaseLabels: true +IndentAccessModifiers: false +IncludeBlocks: Regroup FixNamespaceComments: false +EmptyLineBeforeAccessModifier: LogicalBlock Cpp11BracedListStyle: false -ColumnLimit: 0 CompactNamespaces: false +BreakConstructorInitializers: BeforeColon BreakBeforeBraces: Attach AlwaysBreakTemplateDeclarations: Yes +AllowShortLambdasOnASingleLine: All +AllowShortIfStatementsOnASingleLine: AllIfsAndElse +AllowShortEnumsOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: true AlignTrailingComments: true AlignEscapedNewlines: Left +AlignAfterOpenBracket: DontAlign +AccessModifierOffset: -4 +IncludeCategories: + - Regex: <[[:alnum:]_]+> + Priority: 1 + - Regex: <[[:alnum:]_]+[.]h> + Priority: 2 + - Regex: ^