From c1bfb156844aa3c53b1588c48ba2002143199510 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 4 Jan 2022 20:47:49 +0100 Subject: .clang-format: slightly tweak penalties With the previous settings clang-format seemed too lenient to characters beyond position 80. [skip ci] --- .clang-format | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.clang-format') diff --git a/.clang-format b/.clang-format index 6e13223e..713d2165 100644 --- a/.clang-format +++ b/.clang-format @@ -104,8 +104,8 @@ PenaltyBreakComment: 45 #PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 200 #PenaltyBreakTemplateDeclaration: 10 -PenaltyExcessCharacter: 20 -PenaltyReturnTypeOnItsOwnLine: 60 +PenaltyExcessCharacter: 40 +PenaltyReturnTypeOnItsOwnLine: 100 #PointerAlignment: Left #ReflowComments: true #SortIncludes: true -- cgit v1.2.3 From aa2465bb7991876c3b5afb5afda54f43fefd9e0a Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Thu, 6 Jan 2022 12:04:42 +0100 Subject: .clang-format: try harder to avoid return type on its own line In reality it's often not just the return type but the return type and the preceding attribute, in particular [[deprecated("...")]] - and unfortunately this attribute (and any other, actually) cannot be given its own line using ClangFormat. So at least try to glue those two to the function name as much as possible... --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.clang-format') diff --git a/.clang-format b/.clang-format index 713d2165..8375204a 100644 --- a/.clang-format +++ b/.clang-format @@ -105,7 +105,7 @@ PenaltyBreakComment: 45 PenaltyBreakString: 200 #PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 40 -PenaltyReturnTypeOnItsOwnLine: 100 +PenaltyReturnTypeOnItsOwnLine: 150 #PointerAlignment: Left #ReflowComments: true #SortIncludes: true -- cgit v1.2.3