Re: Add BF member koel-like indentation checks to SanityCheck CI

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Add BF member koel-like indentation checks to SanityCheck CI
Дата
Msg-id CA+TgmoY2M9gKcc7TP=ccpDnztt-sz7OCbxCMZcfZbEcF=gMqwA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add BF member koel-like indentation checks to SanityCheck CI  ("Tristan Partin" <tristan@neon.tech>)
Ответы Re: Add BF member koel-like indentation checks to SanityCheck CI  ("Tristan Partin" <tristan@neon.tech>)
Re: Add BF member koel-like indentation checks to SanityCheck CI  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Jan 9, 2024 at 2:20 PM Tristan Partin <tristan@neon.tech> wrote:
> > I don't indent during most of development, and don't intend to start.
>
> Could you expand on why you don't? I could understand as you're writing,
> but I would think formatting on save, might be useful.

John might have his own answer to this, but here's mine: it's a pain
in the rear end. By the time I'm getting close to committing something
I try to ensure that everything I'm posting is indented. But for early
versions of work it adds a lot of paper-pushing with little
corresponding benefit. I've been doing this long enough that my
natural coding style is close to what pgindent would produce, but
figuring out how many tab stops are needed after a variable name to
make the result agree with pgindent's sentiments is not something I
can do reliably.

> Perhaps the hardest thing to change is the culture of Postgres
> development. If we can't all agree that we want formatted code, then
> there is no point in anything that I discussed.

I think we're basically committed to that at this point, and long have
been. Before koel started grumping, people would periodically pgindent
particular files because if you wanted to indent your new patch, you
had to run pgindent on the file and then back out the changes that
were due to the preexisting file contents rather than your patch. That
was maddening in its own way. The new system is annoying a slightly
different set of people for a slightly different set of reasons, but
everybody understands that in the end, it's all gonna get pgindented.

I also agree with you that the culture of Postgres development is hard
to change. This is the only OSS project that I've ever worked on, and
I still do it the same way I worked on code 30 years ago, except now I
use git instead of cvs. I can't imagine how we could modernize some of
our development practices without causing unacceptable collateral
damage, but maybe there's a way, and for sure the way we do things
around here is pretty far out of the 2023 mainstream. That's something
we should be grappling with, somehow.

--
Robert Haas
EDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Emit fewer vacuum records by reaping removable tuples during pruning
Следующее
От: Pavel Luzanov
Дата:
Сообщение: Re: Things I don't like about \du's "Attributes" column