Re: clang-tidy complaints - Mailing list pgsql-committers

From Tom Lane
Subject Re: clang-tidy complaints
Date
Msg-id 362183.1744475715@sss.pgh.pa.us
Whole thread Raw
In response to clang-tidy complaints  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: clang-tidy complaints
List pgsql-committers
Peter Geoghegan <pg@bowt.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



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix GIN's shimTriConsistentFn to not corrupt its input.
Next
From: Peter Geoghegan
Date:
Subject: Re: clang-tidy complaints