summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-11-08 12:56:26 +0900
committerJunio C Hamano <gitster@pobox.com>2024-11-08 12:56:26 +0900
commita2ac8b0707331f605610191ddbd1218083b89fa5 (patch)
treebd924fc198d2a374539accdaa0cb3c6bca020282
parentc14fa9a511bdb46dbc760924e9383fda78e7677d (diff)
parent7e785b87db46338f8322c030490bbf83a769f3f2 (diff)
Merge branch 'kn/ci-clang-format-tidy'
Updates the '.clang-format' to match project conventions. * kn/ci-clang-format-tidy: clang-format: align consecutive macro definitions clang-format: re-adjust line break penalties
-rw-r--r--.clang-format16
1 files changed, 10 insertions, 6 deletions
diff --git a/.clang-format b/.clang-format
index 41969eca4b..9547fe1b77 100644
--- a/.clang-format
+++ b/.clang-format
@@ -32,6 +32,9 @@ AlignConsecutiveAssignments: false
# double b = 3.14;
AlignConsecutiveDeclarations: false
+# Align consecutive macro definitions.
+AlignConsecutiveMacros: true
+
# Align escaped newlines as far left as possible
# #define A \
# int aaaa; \
@@ -209,13 +212,14 @@ KeepEmptyLinesAtTheStartOfBlocks: false
# Penalties
# This decides what order things should be done if a line is too long
-PenaltyBreakAssignment: 10
-PenaltyBreakBeforeFirstCallParameter: 30
-PenaltyBreakComment: 10
+PenaltyBreakAssignment: 5
+PenaltyBreakBeforeFirstCallParameter: 5
+PenaltyBreakComment: 5
PenaltyBreakFirstLessLess: 0
-PenaltyBreakString: 10
-PenaltyExcessCharacter: 100
-PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyBreakOpenParenthesis: 300
+PenaltyBreakString: 5
+PenaltyExcessCharacter: 10
+PenaltyReturnTypeOnItsOwnLine: 300
# Don't sort #include's
SortIncludes: false