Re: clang-format output in branch kevin/clang-format

Rene Kita <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
On Thu, Mar 26, 2026 at 10:37:58AM +0800, Kevin J. McCarthy wrote:
> On Tue, Mar 24, 2026 at 09:20:55AM +0100, Rene Kita wrote:
> > This
> > #v+
> > -#ifndef RE_NREGS
> > -#define RE_NREGS 30
> > -#endif
> > -
> > +# ifndef RE_NREGS
> > +#  define RE_NREGS 30
> > +# endif
> > #v-
> > 
> > made me stumble. At first I thought 'Right, space after shell comments'
> > only to realize that this is cpp not shell... :-)
> 
> That was actually due to a configuration decision.  See:
> IndentPPDirectives: AfterHash
> 
> There are other choices, but I saw this version in several places and
> arbitrarily chose it.  The other choices were None, Leave, and BeforeHash,
> which would have been:
>   #ifndef RE_NREGS
>     #define RE_NREGS 30
>   #endif
> 
> > While I see some value in the
> > remaining changes (and in general agree about the parentheses style) I'm
> > still not convinced this is worth the noise.
> 
> Yes, that's my conundrum too.  There are some places where the output is...
> bad.  But it's mostly just "okay/acceptable" and it does make everything
> homogeneous.  Perhaps tweaking the "Penalty" configs could reduce some of
> the badness, but that seems an undocumented black art.
> 
> I have to admit I like the parenthesis style too.  I got used to the
> space-before, but it's "noise" and I feel like the code is just a little bit
> easier to look at without them...

JFTR and only in case it was not clear in my last message, I don't like
spaces after the hash and I don't like spaces before parenthesis.

Not that it matters, I just don't want people to think I have a bad
taste. ;-)
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.