From 3213446b46a6fa4e549472e3ffce26483a87ef80 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Thu, 19 Dec 2024 14:05:17 +0100 Subject: [PATCH] STYLE: Disable clang-format style option `AlignConsecutiveDeclarations` No longer enabled the style option of aligning consecutive declarations. The convention of aligning declarations has always bothered some of us, as appeared already during the discussion at https://discourse.itk.org/t/update-coding-style-for-itk/2055 (back in 2019). While this style option may be just a matter of taste, it appears to hinder the collaborative development process, as it pollutes [git] blame, it makes changes to lines that aren't really changing, complicating code review, etc., as Sean McBride remarked at https://github.com/InsightSoftwareConsortium/ITK/pull/5015#discussion_r1884709842. Moreover, it also triggers unnecessary git merge conflicts. Now that clang-format is recently upgraded for ITK (pull request https://github.com/InsightSoftwareConsortium/ITK/pull/5015 commit 0b1fabd319697a61e10602804f4eb02e455ac6a1), it appears the right moment to reconsider this option. --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 45b950284d0..427d9daa9be 100644 --- a/.clang-format +++ b/.clang-format @@ -34,7 +34,7 @@ AlignConsecutiveBitFields: AlignFunctionPointers: false PadOperators: false AlignConsecutiveDeclarations: - Enabled: true + Enabled: false AcrossEmptyLines: false AcrossComments: false AlignCompound: false