On Wed, Mar 18, 2026 at 11:21:28AM +0800, Kevin J. McCarthy wrote:
> On Wed, Mar 18, 2026 at 01:11:14AM +0100, Alejandro Colomar via Mutt-dev 
> wrote:
> > Okay, so I've tried today clang-format(1) for the first time, after
> > someone suggested it in a project I co-maintain, and now have a well
> > formed opinion about it:

> > It's pure crap.  Please don't use it.
[...]
> Before I drop the proposal, though, are there any Mutt devs/contributors who
> would like to play devil's advocate?

In more or less the same boat as Robin on this.

I am not a C programmer, and can't speak to clang-format specifically. I
will say broadly that, since starting to use them, I have really
appreciated autoformatters generally (ruff / black for Python, prettier
for js, etc.), especially when working with a team of people. It may
well turn out that there isn't a good tool available for C, but I do
think that if it is possible to find a formatter that works and can be
enforced, there is a lot to be said for both the resulting consistency,
and kind of taking arguments / bikeshedding about code style and
formatting out of the equation.

I'm not sure if the concerns Alejandro mentioned are about the
functionality of the program, its default configuration, or both. It
does seem like the program supports formatting based on different style
guides, and configuring certain parameters
(https://clang.llvm.org/docs/ClangFormatStyleOptions.html), so maybe
some objections could be overcome by either disabling certain types of
formatting, or choosing different config settings?

Or, maybe come up with the style guide first, then work backwards from
that to see if a formatter / formatter config can be created that will
work?

/w

Reply via email to