Re: Making C function declaration parameter names consistent with corresponding definition names

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Making C function declaration parameter names consistent with corresponding definition names
Дата
Msg-id CAH2-WzmxBXZAE6eyAm1XyPp6X7epCwih5qBupTxQOc6Hqp48fQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Making C function declaration parameter names consistent with corresponding definition names  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Making C function declaration parameter names consistent with corresponding definition names  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Making C function declaration parameter names consistent with corresponding definition names
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Making C function declaration parameter names consistent with corresponding definition names