Re: run pgindent on a regular basis / scripted manner - Mailing list pgsql-hackers

From Tom Lane
Subject Re: run pgindent on a regular basis / scripted manner
Date
Msg-id 3713260.1682194523@sss.pgh.pa.us
Whole thread Raw
In response to Re: run pgindent on a regular basis / scripted manner  (Noah Misch <noah@leadboat.com>)
Responses Re: run pgindent on a regular basis / scripted manner
Re: run pgindent on a regular basis / scripted manner
List pgsql-hackers
Noah Misch <noah@leadboat.com> writes:
> - skip if the break-glass "pgindent: no" appears in a commit message

There are two things that bother me about putting this functionality
into a server hook, beyond the possible speed issue:

* The risk of failure.  I don't have a terribly difficult time imagining
situations where things get sufficiently wedged that the server accepts
*no* commits, not even ones fixing the problem.  An override such as
you suggest here could assuage that fear, perhaps.

* The lack of user-friendliness.  AFAIK, if a pre-receive hook fails
you learn little except that it failed.  This could be extremely
frustrating to debug, especially in a situation where your local
pgindent is giving you different results than the server gets.

The idea of a buildfarm animal failing if --show-diff isn't empty
is attractive to me mainly because it is far nicer from the
debuggability standpoint.

Maybe, after we get some amount of experience with trying to keep
things always indent-clean, we will decide that it's reliable enough
to enforce in a server hook.  I think going for that right away is
sheer folly though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: run pgindent on a regular basis / scripted manner
Next
From: Noah Misch
Date:
Subject: Re: run pgindent on a regular basis / scripted manner