diff options
| author | Karthik Nayak <karthik.188@gmail.com> | 2024-10-18 10:46:46 +0200 |
|---|---|---|
| committer | Taylor Blau <me@ttaylorr.com> | 2024-10-18 17:37:16 -0400 |
| commit | 7e785b87db46338f8322c030490bbf83a769f3f2 (patch) | |
| tree | b604ad80e80c013bd36ce870e61326dda6752146 | |
| parent | 5e9fa0f9fa90450688a3bd1cf2630dc0c574e516 (diff) | |
clang-format: align consecutive macro definitions
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 <karthik.188@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
| -rw-r--r-- | .clang-format | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format index 66a2360ae5..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; \ |
