Skip to content

Commit

Permalink
STYLE: Disable clang-format style option AlignConsecutiveDeclarations
Browse files Browse the repository at this point in the history
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 InsightSoftwareConsortium#5015 (comment).
Moreover, it also triggers unnecessary git merge conflicts.

Now that clang-format is recently upgraded for ITK (pull request
InsightSoftwareConsortium#5015 commit
0b1fabd), it appears the right moment to
reconsider this option.
  • Loading branch information
N-Dekker committed Dec 19, 2024
1 parent 60c3ae5 commit 3213446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AlignConsecutiveBitFields:
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: true
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
Expand Down

0 comments on commit 3213446

Please sign in to comment.