Subject: Re: .clang-format: how useful, how often used, and how well maintained?

From: Junio C Hamano <[email-masked]>
Date: Mon, 23 Jun 2025 09:26:35 -0700

Karthik Nayak <[email-masked]> writes:

>> For that, there are a few things we'd probably need to do:
>>
>>  - Improve our tooling so that the develper can check a range of
>>    commits they made before running format-patch, and other
>>    situations.
>>
>>  - Improve .clang-format rules to reduce false positives.
>>
>
> I think the biggest issue for this is around line wrapping, I'm
> considering just removing it from the '.clang-format'. Perhaps we could
> add it to our '.editorconfig'?

I would not stop others from trying to improve the rules in such a
way that only an overly long lines (like >120 columns) are folded to
reasonable length (line ~72 columns) without doing anything else
(like not concatenating adjacent lines only because the result would
be shorter than 80 columns), but if it is more involved than we can
manage, removing it from .clang-format so that "make style" would
not use would be the best (or "the least bad") approach.