Re: Making C function declaration parameter names consistent with corresponding definition names - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Making C function declaration parameter names consistent with corresponding definition names
Date
Msg-id CAH2-WzmxBXZAE6eyAm1XyPp6X7epCwih5qBupTxQOc6Hqp48fQ@mail.gmail.com
Whole thread Raw
In response to Re: Making C function declaration parameter names consistent with corresponding definition names  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Making C function declaration parameter names consistent with corresponding definition names
List pgsql-hackers
On Fri, Sep 16, 2022 at 4:19 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I agree, this has always been a pet peeve of mine as well.  I would
> have guessed there were fewer examples than you found, because I've
> generally fixed any such cases I happened to notice.

If you actually go through them all one by one you'll see that the
vast majority of individual cases involve an inconsistency that
follows some kind of recognizable pattern. For example, a Relation
parameter might be spelled "relation" in one place and "rel" in
another. I find these more common cases much less noticeable --
perhaps that's why there are more than you thought there'd be?

It's possible to configure the clang-tidy tooling to tolerate various
inconsistencies, below some kind of threshold -- it is totally
customizable. But I think that a strict, simple rule is the way to go
here. (Though without creating busy work for committers that don't
want to use clang-tidy all the time.)
-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Making C function declaration parameter names consistent with corresponding definition names
Next
From: Tom Lane
Date:
Subject: Re: Making C function declaration parameter names consistent with corresponding definition names