Re: Run pgindent now?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Run pgindent now?
Дата
Msg-id 10620.1432438650@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Run pgindent now?  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Run pgindent now?  (Bruce Momjian <bruce@momjian.us>)
Re: Run pgindent now?  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Sun, May 24, 2015 at 04:16:07AM +0200, Andres Freund wrote:
>> -   if (IsA(node, Aggref) || IsA(node, GroupingFunc))
>> +   if (IsA(node, Aggref) ||IsA(node, GroupingFunc))
>> 
>> There's a bunch of changes like this. Looks rather odd to me? I don't
>> recall seing much code looking like that?

> Wow, that is quite odd.

No, pgindent has *always* been wonky about lines that contain a typedef
name but are not variable declarations.  I've gotten in the habit of
breaking IsA tests like these into two lines:
if (IsA(node, Aggref) ||    IsA(node, GroupingFunc))

just so that it doesn't look weird when pgindent gets done with it.
You can see similar weirdness around sizeof usages, if you look.

>> Also, does somebody have an idea to keep pgindent from butchering inline
>> asm like:

> Ah, we have a file /pgtop/src/tools/pgindent/exclude_file_patterns which
> has excluded files, and s_lock.h is one of them.  I think
> /include/port/atomics/arch-x86.h needs to be added, and the pgindent
> commit on the file reverted.

Yeah, probably :-(
        regards, tom lane



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: extend pgbench expressions with functions