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

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: 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 09:00:45
Message-ID: CANWCAZZObZeN9VqgmMY+mk4F1kpkuj=JB65R+o_HHoFT8c+eKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 30, 2023 at 2:21 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> Hi,
>
> How about adding code indent checks (like what BF member koel has) to
> the SanityCheck CI task? This helps catch indentation problems way
> before things are committed so that developers can find them out in
> their respective CI runs and lets developers learn the postgres code
> indentation stuff. It also saves committers time - git log | grep
> 'koel' | wc -l gives me 11 commits and git log | grep 'indentation' |
> wc -l gives me 97. Most, if not all of these commits went into fixing
> code indentation problems that could have been reported a bit early
> and fixed by developers/patch authors themselves.
>
> Thoughts?

There are three possible avenues here:

1) Accept that there are going to be wrong indents committed sometimes
2) Write off buildfarm member koel as an experiment, remove it, and do
reindents periodically. After having been "trained", committers will
still make an effort to indent, and failure to do so won't be a
house-on-fire situation.
3) The current proposal

Number three is the least attractive option -- it makes everyone's
development more demanding, with more CI failures where it's not
helpful. If almost everything shows red in CI, that's too much noise,
and a red sanity check will just start to be ignored. I don't indent
during most of development, and don't intend to start. Inexperienced
developers will think they have to jump through more hoops in order to
get acceptance, making submissions more difficult, with no
corresponding upside for them. Also, imagine a CF manager sending 100
emails complaining about indentation.

So, -1 from me.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2024-01-09 09:01:43 Re: POC: GROUP BY optimization
Previous Message Alexander Lakhin 2024-01-09 09:00:00 Re: Random pg_upgrade test failure on drongo