]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools: less aggressive settings for clang-format 13848/head
authorChristian Hopps <chopps@labn.net>
Sun, 25 Jun 2023 12:13:25 +0000 (08:13 -0400)
committerChristian Hopps <chopps@labn.net>
Mon, 26 Jun 2023 02:06:12 +0000 (22:06 -0400)
- Reports were that the current settings were choosing to extend beyond 80
columns too often. This change makes that more expensive but still tries
very hard to not break before first open parenthesis of function calls.

Signed-off-by: Christian Hopps <chopps@labn.net>
.clang-format

index 5ede63591a0d2f100d34f5ef71beb7ffa6066e6c..12362fae960f75ba4f296dada5ad6516df39d910 100644 (file)
@@ -169,16 +169,16 @@ ObjCSpaceBeforeProtocolList: true
 ## Lowest Penalty Value wins. Values are used by clang-format to influence
 ## the brak decisions, it's a bit of voodoo magic though.
 ## Originally from linux which was "Taken from git's rules"
-PenaltyBreakAssignment: 10
+PenaltyBreakAssignment: 30
 PenaltyBreakComment: 10
 PenaltyBreakFirstLessLess: 0
 # Don't break a string into multi-string-fragments
-PenaltyBreakString: 200
+PenaltyBreakString: 1000
 # Allow going past the ColumnLimit to keep function arguments aligned
 # with the open parenthesis.
-PenaltyBreakBeforeFirstCallParameter: 200
+PenaltyBreakBeforeFirstCallParameter: 1000
 # Try and stay under ColumnLimit, but not at the cost of incomprehensible code.
-PenaltyExcessCharacter: 5
+PenaltyExcessCharacter: 30
 PenaltyReturnTypeOnItsOwnLine: 60
 
 PointerAlignment: Right