Subject: Re: [RFC PATCH 3/4] .clang-format: do not enforce a ColumnLimit

From: Junio C Hamano <[email-masked]>
Date: Mon, 11 Jul 2022 14:37:35 -0700

Ævar Arnfjörð Bjarmason  <[email-masked]> writes:

> As with the preceding change what this leaves us with an unresolved
> question though, should we have some stricter version of "make
> style-all" that incorporates "ColumnLimit: 80", or perhaps apply it
> only on "make style", but then what if someone modifies code that
> happens to e.g. search/replace a line running afoul of the limit?

A more important thing to think about is that there is no single
good cut-off point.  When we say "wrap your lines at around 80
columns", we mean that when there is a good place to fold at around
column 65 and the next good place is at column 82, then it is OK to
go slightly over 80 and wrap at 82, which may be better than
wrapping at 65.  If the last good place to wrap is at column 72 and
the long function call at the end of the line makes you go past the
82nd column, wrapping at column 72 might be better.  I wonder if
there is an automated formatter that understands this kind of shades
of gray and lets us express that.

Thanks.