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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tristan Partin <tristan(at)neon(dot)tech>
Cc: John Naylor <johncnaylorls(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add BF member koel-like indentation checks to SanityCheck CI
Date: 2024-01-09 20:49:38
Message-ID: CA+TgmoY2M9gKcc7TP=ccpDnztt-sz7OCbxCMZcfZbEcF=gMqwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 9, 2024 at 2:20 PM Tristan Partin <tristan(at)neon(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Luzanov 2024-01-09 20:50:48 Re: Things I don't like about \du's "Attributes" column
Previous Message Robert Haas 2024-01-09 20:40:36 Re: Emit fewer vacuum records by reaping removable tuples during pruning