From: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Undesirable entries in typedefs list |
Date: | 2018-03-26 00:43:21 |
Message-ID: | CAA8=A79aEmShju8h8o4ijmYhRaZouznkG3DWUfMNCQQ_Ec65_w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Mar 25, 2018 at 11:32 AM, Andrew Dunstan
<andrew(dot)dunstan(at)2ndquadrant(dot)com> wrote:
> On Sun, Mar 25, 2018 at 3:55 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I noticed that doing pgindent with the current typedefs list available
>> from the buildfarm caused a lot of havoc in what had been stable code.
>> Looking into the reasons, it seems that:
>>
>> (1) "bool" is no longer listed as a typedef name (probably because
>> stdbool.h makes it a macro instead);
>>
>> (2) "abs", "boolean", "iterator", "other", "pointer", "reference",
>> "string", and "type" all now are listed as typedef names.
>>
>> It's probably okay to treat "boolean" as a typedef, but all those others
>> are complete disasters. Anyone know where they're coming from?
>>
>> As for "bool", we could probably deal with that most reliably by
>> having pgindent add it as a special case. Maybe we could get it
>> back in there by having some trailing-edge buildfarm member
>> contribute typedefs, but that seems like a solution with a rather
>> limited half-life.
>>
>
>
> pgindent already has a list of blacklisted typedefs (see lines 121 to 123)
>
Here's a patch to pgindent which I think will do what you want fairly
simply, assuming you have identified all the offending tokens.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
pgindent-whiteblacklist.patch | application/octet-stream | 945 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-03-26 01:33:38 | Re: file cloning in pg_upgrade and CREATE DATABASE |
Previous Message | Stephen Frost | 2018-03-25 23:59:35 | Re: Using base backup exclusion filters to reduce data transferred with pg_rewind |