Re: Add BF member koel-like indentation checks to SanityCheck CI - Mailing list pgsql-hackers

From John Naylor
Subject Re: Add BF member koel-like indentation checks to SanityCheck CI
Date
Msg-id CANWCAZZObZeN9VqgmMY+mk4F1kpkuj=JB65R+o_HHoFT8c+eKg@mail.gmail.com
Whole thread Raw
In response to Add BF member koel-like indentation checks to SanityCheck CI  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Add BF member koel-like indentation checks to SanityCheck CI
Re: Add BF member koel-like indentation checks to SanityCheck CI
List pgsql-hackers
On Mon, Oct 30, 2023 at 2:21 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.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.



pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: Random pg_upgrade test failure on drongo
Next
From: Andrei Lepikhov
Date:
Subject: Re: POC: GROUP BY optimization