Re: run pgindent on a regular basis / scripted manner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: run pgindent on a regular basis / scripted manner
Дата
Msg-id 1489276.1674427657@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: run pgindent on a regular basis / scripted manner  (Andres Freund <andres@anarazel.de>)
Ответы Re: run pgindent on a regular basis / scripted manner
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> I strongly dislike it, I rarely get it right by hand - but it does have some
> benefit over aligning variable names based on the length of the type names as
> uncrustify/clang-format: In their approach an added local variable can cause
> all the other variables to be re-indented (and their initial value possibly
> wrapped). The fixed alignment doesn't have that issue.

Yeah.  That's one of my biggest gripes about pgperltidy: if you insert
another assignment in a series of assignments, it is very likely to
reformat all the adjacent assignments because it thinks it's cool to
make all the equal signs line up.  That's just awful.  You can either
run pgperltidy on new code before committing, and accept that the feature
patch will touch a lot of lines it's not making real changes to (thereby
dirtying the "git blame" history) or not do so and thereby commit code
that's not passing tidiness checks.  Let's *not* adopt any style that
causes similar things to start happening in our C code.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pgindent vs variable declaration across multiple lines
Следующее
От: "Joel Jacobson"
Дата:
Сообщение: Re: [PATCH] Use 128-bit math to accelerate numeric division, when 8 < divisor digits <= 16