Re: Add --check option to pgindent

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Add --check option to pgindent
Дата
Msg-id C4149FA1-AB7F-4869-8A5B-A029A70212CB@yesql.se
обсуждение исходный текст
Ответ на Add --check option to pgindent  ("Tristan Partin" <tristan@neon.tech>)
Ответы Re: Add --check option to pgindent  (Michael Banck <mbanck@gmx.net>)
Список pgsql-hackers
> On 12 Dec 2023, at 01:09, Tristan Partin <tristan@neon.tech> wrote:
>
> Not sold on the name, but --check is a combination of --silent-diff and --show-diff. I envision --check mostly being
usedin CI environments. I recently came across a situation where this behavior would have been useful. Without --check,
you'releft to capture the output of --show-diff and exit 2 if the output isn't empty by yourself. 

I wonder if we should model this around the semantics of git diff to keep it
similar to other CI jobs which often use git diff?  git diff --check means "are
there conflicts or issues" which isn't really comparable to here, git diff
--exit-code however is pretty much exactly what this is trying to accomplish.

That would make pgindent --show-diff --exit-code exit with 1 if there were
diffs and 0 if there are no diffs.

--
Daniel Gustafsson




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2
Следующее
От: Michael Banck
Дата:
Сообщение: Re: Add --check option to pgindent