Re: pgindent run?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Mark Dilger <hornschnorter(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgindent run?
Date: 2017-11-28 21:38:12
Message-ID: 10248.1511905092@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> On Wed, Nov 29, 2017 at 9:47 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I think that'd be taking it too far, especially given that the dependency
>> on a typedefs list means that the git hook might have a different idea
>> of what's correctly indented than the committer does. It'd be very hard
>> to debug such discrepancies and figure out what would satisfy the hook.

> Is there no way to get reasonable indentation that doesn't depend on
> that typedefs list?

Perhaps, but not with the tool we've got.

It's well known that C is unparseable without knowing which identifiers
are typedefs, so it doesn't exactly surprise me that it might not be
sanely indentable without knowing that. But I've not thought hard about
it, nor looked for alternate tools.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-11-28 21:40:49 Re: [HACKERS] PG10 partitioning - odd behavior/possible bug
Previous Message Feike Steenbergen 2017-11-28 21:36:05 Skip index cleanup if autovacuum did not do any work