]> granicus.if.org Git - git/commitdiff
clang-format: adjust penalty for return type line break
authorPatryk Obara <patryk.obara@gmail.com>
Wed, 24 Jan 2018 11:11:54 +0000 (12:11 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Jan 2018 21:42:04 +0000 (13:42 -0800)
The penalty of 5 makes clang-format very eager to put even short type
declarations (e.g. "extern int") into a separate line, even when
breaking parameters list is sufficient.

Signed-off-by: Patryk Obara <patryk.obara@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.clang-format

index 611ab4750bd21e77d0fec41c8b2e115574c692ff..12a89f95f993546888410613458c9385b16f0108 100644 (file)
@@ -163,7 +163,7 @@ PenaltyBreakComment: 10
 PenaltyBreakFirstLessLess: 0
 PenaltyBreakString: 10
 PenaltyExcessCharacter: 100
-PenaltyReturnTypeOnItsOwnLine: 5
+PenaltyReturnTypeOnItsOwnLine: 60
 
 # Don't sort #include's
 SortIncludes: false