pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Jelte Fennema <postgres@jeltef.nl>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Jesse Zhang <sbjesse@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: run pgindent on a regular basis / scripted manner
Date: Sat, 28 Jan 2023 23:22:19 -0500
Message-ID: <4192135.1674966139@sss.pgh.pa.us> (raw)
In-Reply-To: <20230129010603.GA1677550@rfd.leadboat.com>
References: <20230123001518.6hxyiczhn4kadvmf@awork3.anarazel.de>
	<1502504.1674433722@sss.pgh.pa.us>
	<20230123011002.fzcaa3krql3mqsfn@awork3.anarazel.de>
	<1509591.1674437376@sss.pgh.pa.us>
	<1608158.1674486546@sss.pgh.pa.us>
	<20230123173136.knn77pbuakhvjfgk@awork3.anarazel.de>
	<Y874Fh0q4mkk1s22@momjian.us>
	<CAGECzQTqoGHrePM_pwmhaM+J1XOygYjzFod4sf=PAt7J4A19Mw@mail.gmail.com>
	<2238493.1674572097@sss.pgh.pa.us>
	<Y9ArogF7c+UgPgq9@momjian.us>
	<20230129010603.GA1677550@rfd.leadboat.com>

Noah Misch <noah@leadboat.com> writes:
> Yes, a hook intended to enforce pgindent cleanliness should run tree-wide
> pgindent when the given commit(s) change the typedef list.  typedef list
> changes essentially become another kind of refactoring that can yield merge
> conflicts.  If your commit passed the pgindent check, rebasing it onto a new
> typedefs list may require further indentation changes.  New typedefs don't
> tend to change a lot of old code, so I would expect this sort of conflict to
> be minor, compared to all the other sources of conflicts.

In fact, if a typedef addition *does* affect a lot of old code,
that's a good sign that the choice of typedef name ought to be
rethought: it's evidently conflicting with existing names.

I'm not sure what that observation implies for our standard
practices here.  But it does suggest that "let pgindent do what
it wants without human oversight" probably isn't a good plan.
We've seen that to be true for other reasons as well, notably that
it can destroy the readability of carefully-laid-out comments.

			regards, tom lane





view thread (308+ messages)  latest in thread

Message-ID: <4192135.1674966139@sss.pgh.pa.us>
Permalink:  ../4192135.1674966139@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4192135.1674966139@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, bruce@momjian.us, postgres@jeltef.nl, andres@anarazel.de, pg@bowt.ie, magnus@hagander.net, alvherre@2ndquadrant.com, sfrost@snowman.net, sbjesse@gmail.com
  Subject: Re: run pgindent on a regular basis / scripted manner
  In-Reply-To: <4192135.1674966139@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox