[postgis-devel] Code formatting digging in

Sandro Santilli strk at kbt.io
Fri Feb 23 03:21:42 PST 2018


On Thu, Feb 22, 2018 at 11:26:39PM +0100, Tomas Vondra wrote:
> AFAIK that only includes header files, so no - pgindent is not there.
> But it's not like it's a massive tool - you can get it here:
> 
>     https://github.com/postgres/postgres/tree/master/src/tools/pgindent
> 
> and include it in PostGIS. Or to be more precise, it's a separate tool
> available here:
> 
>     https://git.postgresql.org/git/pg_bsd_indent.git

Ok then it would be good for our use.
Sum of *.c *.h and README* is 160K vs. 664K of astyle.
And pg_bsd_indent is C code instaed of C++, which means we don't
need to require an additional compiler.

> Not really, it tends to be very stable. One of the primary reasons why
> we have pgindent is to make all the branches more alike, to make
> back-patching simpler. Changing the formatting rules between releases
> would directly contradict that.

I'm sold, did I hear you volunteering to send a PR for integration
of that package in PostGIS ? Or I'll get to that eventually.

--strk;


More information about the postgis-devel mailing list