From 83b05259f8e5961e549eaaadf049526d3261e4cc Mon Sep 17 00:00:00 2001 From: Max Wash Date: Tue, 22 Apr 2025 15:32:08 +0100 Subject: [PATCH] meta: update clang-format config some source files are recognised as objc source files due to the use of array initialiser macros. because of this, the C/C++ formatting settings defined in .clang-format weren't being used. now, the correct settings are applied for objc files too. --- .clang-format | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.clang-format b/.clang-format index be15bcc..39138c0 100644 --- a/.clang-format +++ b/.clang-format @@ -56,3 +56,59 @@ AttributeMacros: ForEachMacros: - b_btree_foreach - b_queue_foreach +--- +Language: ObjC +DerivePointerAlignment: false +PointerAlignment: Right +ColumnLimit: 80 +AlignAfterOpenBracket: AlwaysBreak +AlignConsecutiveAssignments: None +AlignConsecutiveBitFields: None +AlignConsecutiveDeclarations: None +AlignConsecutiveMacros: AcrossEmptyLinesAndComments +AlignEscapedNewlines: Right +AlignOperands: AlignAfterOperator +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: Empty +AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: false +AllowShortLambdasOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: true +BinPackParameters: true +ExperimentalAutoDetectBinPacking: false +BitFieldColonSpacing: Both +BreakBeforeBraces: Linux +BreakBeforeBinaryOperators: All +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeComma +BreakInheritanceList: BeforeComma +BreakStringLiterals: true +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: true +IncludeBlocks: Regroup +SortIncludes: true +IndentRequires: true +NamespaceIndentation: Inner +ReflowComments: true +SpacesBeforeTrailingComments: 3 +TabWidth: 8 +UseTab: AlignWithSpaces +PenaltyReturnTypeOnItsOwnLine: 1000000 +PenaltyExcessCharacter: 5 +PenaltyBreakOpenParenthesis: 5 +PenaltyBreakBeforeFirstCallParameter: 5 +PenaltyIndentedWhitespace: 0 +AttributeMacros: + - BLUELIB_API +ForEachMacros: + - b_btree_foreach + - b_queue_foreach