Re: clang-tidy complaints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: clang-tidy complaints
Date: 2025-04-12 16:35:15
Message-ID: 362183.1744475715@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> The first such complaint concerns a new mcxt.c function parameter that
> shadows a global variable in the same file -- attached patch fixes
> that by renaming the function parameter. Technically, this is a
> distinct type of complaint to the clang-tidy complaints that I
> ordinarily fix this time of year, though it's of the same general
> nature.

Isn't that obsolete in the wake of 55ef7abf8? I'd be inclined to
leave it alone if no longer needed, because (to me anyway) "darea"
reads worse than "area".

> The second such complaint is a standard "function parameter name is
> inconsistent" complaint, though it's one that affects vendored code in
> src/include/snowball/libstemmer/header.h. I attach a fix for that,
> too. In the past we have tended to treat cases with vendored code just
> like non-vendored Postgres code, but there's always a question about
> whether it's worth diverging from upstream. That needs to be decided
> on a case-by-case basis, and I don't know enough to know if I should
> proceed here.

I don't want to diverge from upstream snowball here, because we do
absorb new snowball versions every so often, so the problem would just
come back. Maybe you could write to upstream and see if they'd accept
the change? If they do, it'd be fine to apply locally.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2025-04-12 16:47:39 Re: clang-tidy complaints
Previous Message Tom Lane 2025-04-12 16:28:14 pgsql: Fix GIN's shimTriConsistentFn to not corrupt its input.