Hi Kevin,

On 2026-03-26T10:37:58+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,

This is interesting.  There's a 'Leave' option, which means
clang-format(1) remembers the original value.  I wish there was a
similar option for all other configurations.

Sadly, that's not the case, and thus, clang-tidy(1) is bad IMO.


Have a lovely day!
Alex

> 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...
> 
> This week I've been a bit busy, so I've let the message sit.  I'll give a
> couple more days for comments.
> 
> > It also adds some horrible things like:
> > #v+
> > -    (!ciss->path || url_pct_decode (ciss->path) >= 0) ? 0 : -1;
> > +                 (!ciss->path || url_pct_decode (ciss->path) >= 0) ?
> > +             0 :
> > +             -1;
> > #v-
> 
> Yup.
> 
> > and
> > 
> > #v+
> > -  scratch[taglen] = 0; /* overwrite the colon as mutt_parse_rfc822_line 
> > expects */
> > +  scratch[taglen] =
> > +      0; /* overwrite the colon as mutt_parse_rfc822_line expects */
> > #v-
> 
> Yeah, I think the problem here is that I'm not letting it mess with comments
> via:
> ReflowComments: IndentOnly
> 
> Because the alternative would be to totally destroy any carefully formatted
> comments in the code.
> 
> > Just my 2c.
> 
> Thanks for taking a look.
> 
> -- 
> Kevin J. McCarthy
> GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA



-- 
<https://www.alejandro-colomar.es>

Attachment: signature.asc
Description: PGP signature

Reply via email to