Re: pgindent run?
Bruce Momjian <bruce@momjian.us>
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Mark Dilger <hornschnorter@gmail.com>, Robert Haas <robertmhaas@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2018-01-24T03:22:47Z
Lists: pgsql-hackers
On Tue, Nov 28, 2017 at 04:38:12PM -0500, Tom Lane wrote: > Thomas Munro <thomas.munro@enterprisedb.com> writes: > > On Wed, Nov 29, 2017 at 9:47 AM, Tom Lane <tgl@sss.pgh.pa.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. For people curious about the C typedef parsing details: http://calculist.blogspot.com/2009/02/c-typedef-parsing-problem.html https://stackoverflow.com/questions/243383/why-cant-c-be-parsed-with-a-lr1-parser -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
Commits
-
Update typedefs.list and re-run pgindent
- eaedf0df7197 11.0 landed