Re: run pgindent on a regular basis / scripted manner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: run pgindent on a regular basis / scripted manner
Дата
Msg-id 3713260.1682194523@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: run pgindent on a regular basis / scripted manner  (Noah Misch <noah@leadboat.com>)
Ответы Re: run pgindent on a regular basis / scripted manner  (Noah Misch <noah@leadboat.com>)
Re: run pgindent on a regular basis / scripted manner  (Andrew Dunstan <andrew@dunslane.net>)
Список 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 по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner
Следующее
От: Noah Misch
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner