Skip to content

Commit

Permalink
clang-format: align consecutive macro definitions
Browse files Browse the repository at this point in the history
We generally align consecutive macro definitions for better readability.
So let's add the rule in clang-format to follow this.

Signed-off-by: Karthik Nayak <[email protected]>
  • Loading branch information
KarthikNayak committed Oct 9, 2024
1 parent 3557012 commit 436ae53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ AlignConsecutiveAssignments: false
# double b = 3.14;
AlignConsecutiveDeclarations: false

# Style of aligning consecutive macro definitions.
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true

# Align escaped newlines as far left as possible
# #define A \
# int aaaa; \
Expand Down

0 comments on commit 436ae53

Please sign in to comment.