From: Karthik Nayak Date: Thu, 10 Oct 2024 17:59:11 GMT Subject: [PATCH v2 3/3] clang-format: align consecutive macro definitions Message-ID: <6ebcd2690e05820e15584fe5459dc46011fde101.1728582927.git.karthik.188@gmail.com> In-Reply-To: We generally align consecutive macro definitions for better readability: #define OUTPUT_ANNOTATE_COMPAT (1U<<0) #define OUTPUT_LONG_OBJECT_NAME (1U<<1) #define OUTPUT_RAW_TIMESTAMP (1U<<2) #define OUTPUT_PORCELAIN (1U<<3) over #define OUTPUT_ANNOTATE_COMPAT (1U<<0) #define OUTPUT_LONG_OBJECT_NAME (1U<<1) #define OUTPUT_RAW_TIMESTAMP (1U<<2) #define OUTPUT_PORCELAIN (1U<<3) So let's add the rule in clang-format to follow this. Signed-off-by: Karthik Nayak --- .clang-format | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.clang-format b/.clang-format index d655b08ff6..22ae882923 100644 --- a/.clang-format +++ b/.clang-format @@ -35,6 +35,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; \ -- 2.47.0