Re: pgindent vs. git whitespace check

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgindent vs. git whitespace check
Дата
Msg-id 42726.1677077534@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgindent vs. git whitespace check  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: pgindent vs. git whitespace check  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> Commit e4602483e95 accidentally introduced a situation where pgindent
> disagrees with the git whitespace check.  The code is

>          conn = libpqsrv_connect_params(keywords, values,
>                                          /* expand_dbname = */ false,
>                                         PG_WAIT_EXTENSION);

> where the current source file has 4 spaces before the /*, and the
> whitespace check says that that should be a tab.

Hmm, I don't think that's per project style in the first place.
Most places that annotate function arguments do it like

         conn = libpqsrv_connect_params(keywords, values,
                                        false, /* expand_dbname */
                                        PG_WAIT_EXTENSION);

pgindent has never been very kind to non-end-of-line comments, and
I'm not excited about working on making it do so.  As a thought
experiment, what would happen if we reversed course and started
allowing "//" comments?  Naive conversion of this comment could
break the code altogether.  (Plenty of programming languages
don't even *have* non-end-of-line comments.)

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgindent vs. git whitespace check
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2