Re: clang-format

"Kevin J. McCarthy" <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <abtoES9-_XG9ro3U@qinghai>
On Wed, Mar 18, 2026 at 11:21:28AM +0800, Kevin J. McCarthy wrote:
>Okay, you don't have to twist my arm.  I resisted formatters myself 
>for a long time already, but started to feel like "everyone else was 
>doing it" and thought I'd give it a look.
>
>Before I drop the proposal, though, are there any Mutt 
>devs/contributors who would like to play devil's advocate?

Thanks Robin (yes your voice counts too), Will, Steffen, and of course 
Alex for continuing the discussion some more.  I was getting mostly 
negative feedback and wanted to know if *anyone* felt there was a 
benefit to formatters.

Just looking over the initial results of my trial run last weekend 
again, there are some iffy results, but overall it wasn't that terrible. 
I suppose how you feel about the result depends on how picky you are 
about formatting, and how well your format style can be expressed in the 
.clang-format config.

The mutt code is already on the messy side.  It's a mostly-Allman style 
with a space in front of funcalls.  But otherwise is a mish-mash of 
pointer-operator locations, cast styles, and other miscellanea.  I think 
a little iffy results would be okay if it meant smoothing out the 
inconsistencies.

My only problem is the gettext calls are spaced too: "_ (" and "N_ (". 
I was initially thinking about following up with a sed script to fix 
those.  But now, I'm actually leaning towards getting rid of the space 
before parens completely.  It's not a conventional style, and combined 
with nested gettext calls (or any nesting really), looks terrible.

This weekend, I'm planning on releasing 2.3.1 from stable.  After that, 
I think I'll change the config to remove the space before funcall, run 
it again, commit to a branch and announce it here.  You all can take a 
look and tell me what you think.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmm7aBEACgkQre92hIAx
a9qqdw//dK0gH+3jju6CV7I/ZWCLW9GN9DvKnVkOlutlnTv0Bqd2KRwSW4NQ/Irq
m91qhgTbhNr/32sHqwsSzaki7TGeJlAEHfySCRnXvZ6XOWSb8MgX+D2J3gF1iGoh
ilJxlCv+ymq0JGAXGnRHOKPdJ0HZGQ7lrm/EW+En1YRkoDV6J4hO5ZLhb/no3zHV
OvBHFBxU30JUEJ+xrQF19+QGRRT3PYste/t4q5COWuqACAIlnalEpwmW4dKV2f1l
sF7zUul38LBampAUfGh4E0sTATcV/u8duu0tisU/8ryFu01eqgahX/HhKT0OkVht
m1Cp9iDvworFuBohgg7kcX+mKgsTZIUbR8xhX1yF68SNDPk5Nn1NojazO+0qYqJR
ggU0vIWPlGgCRsRLMpv99lUMxWOr+60TPZFLGRmamiVlZMec0fYN31wAxuN3ejGY
b0NAW2uAFmGFxGM7iSqaQB2DtoLagMSf7VNQu1GOvuPHmu/VdFsns1fNmngwDfz2
VB7Y2Q1z2ObyYeoTXa/19qphhnfiCAxrZH69O9mDudAe7cDoMOvZriZaMqFdp3c6
6+XwCSYFfVJMj9K8AgzM6lZb6pDF1b/Dwtwj1pVsdb/0v4cxwkMWdY2LcN6rXDQ2
bC5FwB39r7WCx3ij3Vq5avwgz1D8hUbNosE7z8DZR2+S2sK6ksE=
=qvaW
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.