pgindent fixups

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgindent fixups
Дата
Msg-id CA+TgmoZfmMDAuCKnR_d-U_0T=4rcqU4=NVacKcKTW7YEinyrRg@mail.gmail.com
обсуждение исходный текст
Ответы Re: pgindent fixups  (Andrew Dunstan <andrew@dunslane.net>)
Re: pgindent fixups  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I spent some time going through the output of a trial pgindent run
today.  Some questions/problems:

1. Is pgindent supposed to touch DATA() lines?  Because it does.

2. CustomPathMethods is not in the buildfarm's typedefs.list.  Why not?

I'm attaching a patch that fixes up a few other problems that I found,
which I'll commit if there are not objections.  In detail:

- In contrib/pageinspect/heapfuncs.c, it separates the declaration of
bits_len from the initialization to avoid an awkward line-wrap.

- In src/backend/executor/execParallel.c, it dodges two cases where
pgindent does stupid things with offsetof.  Apparently, pgindent
thinks that you should write "offsetof(a, b) +c" rather than
"offsetof(a, b) + c".  In one case, I talked it out of it by putting
the + at the end of the first line rather than the start of the
continuation line.  The other statement was all on one line so I
changed it to say "c + offsetof(a, b)" instead.

- In nodeAgg.c, to_ts_any.c, and tsvector_op.c, I moved end-of-line
comments to their own separate lines, because they were getting broken
up into multiple lines in ways that seemed awkward.  In tsginidx.c, I
left a similar comment inline but fiddled the whitespace and comment
text to avoid getting a line break in mid-comment.

- In spell.c, I added -------- markers around a comment to prevent
pgindent from messing with the whitespace (entab still adjusts it, but
that should look the same if you have your tab stops set right).

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

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

Предыдущее
От: "dandl"
Дата:
Сообщение: Re: About subxact and xact nesting level...
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix assorted inconsistencies in GIN opclass support function dec