Re: clang-format

"Kevin J. McCarthy" <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <abYeLNLCBDiN-X4F@qinghai>
On Sat, Mar 14, 2026 at 06:07:51PM +0100, Rene Kita wrote:
>I don't like formatters. From my experience they work most of the time,
>but are a massive PITA the other times. Especially when you don't
>control the machine the formatter is running on. Different versions will
>behave differently or will not accept some options because the version
>is too old. Even worse when the formatter is part of the CI pipeline.
>Then I will have to fiddle manually with code to make the version
>running in CI happy if my local version outputs something different.

I understand, especially after noting the config vars and expected 
values seem to change quite a bit over versions.

As I mentioned in my reply to Alex, perhaps we could run this once, as a 
general clean up, leave the config as a reference, but not hook it up in 
the pipeline?

>I would expect volunteer contributors to be motivated enough to submit
>readable code - in contrast to some corporate environment. Is/Was bad
>formatting really a problem that warrants the extra effort?

Mmm... generally, but not always.  The biggest problem is the space
before parens, but see my reply to Alex.

Another issue are the various differences between source files.  For 
example, some files align '*' next to vars, some next to type:

   int* foo;
   int *foo;

And little quirks like that.  It's not a huge deal for me either, but 
when you go to work in a function that's different, it's hard to know 
whether to fix up the whole function, go with the flow in the function, 
or do it the "right way" in just your change, which contributes to the 
feeling of "random formatting".

-- 
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-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmm2HiwACgkQre92hIAx
a9qPuRAAt8fn4SZQsu95umplhFnfn4AQH/cnb2zh8EUhA++hxqHOBB+Pm7st3+Lc
7QdoHEU1TjzF17JwcFTLjvg9jVXyfbsgKWqbIcjae1u07lmoeOf6GmneD2K7F7VO
MkuyRscdwb7gOK5f+LtFyXwWLAVu+X6c6+fhAgG4C9a/AirWrZ2Sx4RHyy+FBgAV
BQa47Wg/eQCF5CQCWwu7MxWunYyyygLvIWnLucGIPPhYtiUiB7vn7QXrmc4pCkby
9lhBkthhNfDkySCOLx3sifaGpwMUmBpCAWGYXWdFML5D+ry67SnN6GASiKIcpRfH
YrEqKqQgFMQzGkcEp6UvJA/Kn0MaEPKRMVH9Gz+fH763PyjwU1fEj+VRAz7QNrfk
V/lfRAuxLLJmkmuVSI0Cq/De93niLgnoG2YOlPmKPHztV3l1TsbDeQS8r33I5tFV
PVYnfT8Teeb45bCO5f91SZxY9u0twS0D/eLv5FBf/VWXqHJ7xwG38ng/ndVq/K2P
X3INH2TFE6uRN2yek4TwKWMyeR6JUQ/OeOCJNuGzpnzVF0Pa5uQIlrlAJx2O5h1/
CtpY3iaYAy9kPOAwLYbg/bOVgFR6xoMpBg75RTkJVn6MsX/ZY+t7Q72zDwstlY67
qhFnI3sK7lP/awQpsc1xncps6va8QbLryBuGGxMmEn8jzOktFWY=
=7tRj
-----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.