On 2016-05-25 21:13, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Sun, May 22, 2016 at 4:16 PM, Piotr Stefaniak
>> <postgres@piotr-stefaniak.me> wrote:
>>> I think I've managed to improve pg_bsd_indent's handling of two types of
>>> cases.
>
>> Wow, that seems pretty great. I haven't scrutinized your changes to
>> pg_bsd_indent, but effect_on_pg.diff looks like a large improvement.
> Assuming this patch withstands more careful review, we will need to think
> about project policy for how/when to apply such fixes.
The patches have got committed upstream and work well for Postgres. You
can take FreeBSD indent(1) as of SVN r303746, apply patches from
https://github.com/pstef/freebsd_indent/commits/pass2 (subject to heavy
rebasing) and use as pg_bsd_indent for pgindent.
There are more fixes I intend to do, of which the most relevant for
Postgres are:
1) fixing "function pointer typedef formatting"
2) adding a -tsn option like in GNU indent, for setting how many columns
a tab character will produce. I had a preliminary patch implementing
that and I have to say that while it removes the need for entab, it also
introduces a lot of seemingly pointless changes in formatting which will
be arguably improvements or regressions.