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
maint
Junio C Hamano 2024-11-08 12:56:26 +09:00
commit a2ac8b0707
1 changed files with 10 additions and 6 deletions

View File

@ -32,6 +32,9 @@ AlignConsecutiveAssignments: false
# double b = 3.14; # double b = 3.14;
AlignConsecutiveDeclarations: false AlignConsecutiveDeclarations: false


# Align consecutive macro definitions.
AlignConsecutiveMacros: true

# Align escaped newlines as far left as possible # Align escaped newlines as far left as possible
# #define A \ # #define A \
# int aaaa; \ # int aaaa; \
@ -209,13 +212,14 @@ KeepEmptyLinesAtTheStartOfBlocks: false


# Penalties # Penalties
# This decides what order things should be done if a line is too long # This decides what order things should be done if a line is too long
PenaltyBreakAssignment: 10 PenaltyBreakAssignment: 5
PenaltyBreakBeforeFirstCallParameter: 30 PenaltyBreakBeforeFirstCallParameter: 5
PenaltyBreakComment: 10 PenaltyBreakComment: 5
PenaltyBreakFirstLessLess: 0 PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10 PenaltyBreakOpenParenthesis: 300
PenaltyExcessCharacter: 100 PenaltyBreakString: 5
PenaltyReturnTypeOnItsOwnLine: 60 PenaltyExcessCharacter: 10
PenaltyReturnTypeOnItsOwnLine: 300


# Don't sort #include's # Don't sort #include's
SortIncludes: false SortIncludes: false