Re: pgsql: Mention why one C file fails pgindent.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Mention why one C file fails pgindent.
Date: 2011-02-06 15:47:16
Message-ID: 201102061547.p16FlG613697@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Andrew Dunstan wrote:
>
>
> Bruce Momjian wrote:
> > Log Message:
> > -----------
> > Mention why one C file fails pgindent.
> >
> > Modified Files:
> > --------------
> > pgsql/src/tools/pgindent:
> > README (r1.41 -> r1.42)
> > (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/tools/pgindent/README?r1=1.41&r2=1.42)
> >
> >

[ Sorry for the late reply.]

> Why not add the file that breaks to
> src/tools/pgindent/exclude_file_patterns? (And also maybe the file Tom
> just fixed).

I thought about that, but right now exclude_file_patterns only has files
who's contents by definition can't be handled by pgindent, or we don't
want to be handled by pgindent. wparser_def.c is a case where it is a
specific macro that is triggering the problem.

> And ISTM we should have a list of typdefs for pgindent to ignore anyway.
> Currently, the buildfarm ignores:
>
> 'date','interval','timestamp','ANY'
>
> We should probably add 'DECIMAL' to that list.

Yes, we could do that, but looking now, I see that several macros
already use _T to prevent name conflicts, so I have done that with
DECIMAL, now DECIMAL_T; patch attached.

> But really, this list should probably be part of pgindent, not of the
> typedef finding code.

Hard to say on that one. I can easily add a filter file; I should also
rewrite it in perl and try out GUN indent too, but I have no idea what
day that will be. :-(

Thanks for the ideas.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/pgindent.diff text/x-diff 4.2 KB

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2011-02-06 15:48:33 pgsql: Rename macro DECIMAL to DECIMAL_T to help pgindent; this is alr
Previous Message Magnus Hagander 2011-02-06 06:47:19 Re: [COMMITTERS] pgsql: Include more status information in walsender results