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

Attachment: pgindent-cleanup.patch
Description: application/download

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to