From 215f22cce3e7cdcb4028415bc7bbb16ead4690ae Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 12 Dec 2024 18:38:53 -0300 Subject: [PATCH] [clang-format] New ColumnLimit=100 and new penalty weights Making PenaltyBreakAssignment bigger creates better looking const/variable declarations, where the following term to the assignment operator is in the same line. --- .clang-format | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.clang-format b/.clang-format index 405cee86d..d9f744de0 100644 --- a/.clang-format +++ b/.clang-format @@ -105,7 +105,7 @@ BreakFunctionDefinitionParameters: false BreakInheritanceList: AfterComma BreakStringLiterals: false BreakTemplateDeclarations: Yes -ColumnLimit: 80 +ColumnLimit: 100 CompactNamespaces: true ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 2 @@ -153,17 +153,17 @@ ObjCBreakBeforeNestedBlockParam: true ObjCSpaceAfterProperty: false ObjCSpaceBeforeProtocolList: true PackConstructorInitializers: BinPack -PenaltyBreakAssignment: 2 -PenaltyBreakBeforeFirstCallParameter: 19 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 +PenaltyBreakAssignment: 50 +PenaltyBreakBeforeFirstCallParameter: 2 +PenaltyBreakComment: 30 +PenaltyBreakFirstLessLess: 12 PenaltyBreakOpenParenthesis: 0 PenaltyBreakScopeResolution: 500 -PenaltyBreakString: 1000 -PenaltyBreakTemplateDeclaration: 10 -PenaltyExcessCharacter: 1000000 +PenaltyBreakString: 100 +PenaltyBreakTemplateDeclaration: 1 +PenaltyExcessCharacter: 100 PenaltyIndentedWhitespace: 0 -PenaltyReturnTypeOnItsOwnLine: 1000 +PenaltyReturnTypeOnItsOwnLine: 200 PointerAlignment: Left PPIndentWidth: -1 QualifierAlignment: Leave