[postgis-devel] Code formatting digging in

Paul Ramsey pramsey at cleverelephant.ca
Wed Feb 28 08:15:39 PST 2018


+1. The issue is additional dependencies and minimal effort for devs
to create identical results. An embedded formatter like astyle or
pgindent gives us the easiest way of achieving that. (Another proposed
solution: stop f___ing with formatting. I know, it's an impossible
dream.)

P.

On Wed, Feb 28, 2018 at 8:09 AM, Sandro Santilli <strk at kbt.io> wrote:
> On Wed, Feb 28, 2018 at 02:34:08PM +0000, Darafei "Komяpa" Praliaskouski wrote:
>
>> TLDR: pgindent heavily broken, style ported to clang-format, let's use
>> clang-format with pgindent style.
>
> Maybe you failed to understand the reason "pgindent" was considered
> better than "clang-format": possibility to shipt the tool with PostGIS.
>
> If "pgindent" is broken I suggest to file issues upstream:
>
>     https://git.postgresql.org/git/pg_bsd_indent.git
>
> According to Tomas this would be the same code as the one also
> embedded in PostgreSQL, but maybe that's not the case ?
>
>     https://github.com/postgres/postgres/tree/master/src/tools/pgindent
>
>> Some practices from pgindent and postgres code stylestill can be adopted
>> though even the tool does not fit. I ported Postgres brace style to
>> .clang-format in my PR.
>
> I really don't care about which style is choosen, as long as we can
> make it easy for any contributor to produce patches that will meet
> the criteria our build bots will expect.
>
> At the moment the proposed solutions are:
>
>      tool              | additional dependencies
>   ---------------------+-------------------------------------
>    embedded pgindent   |
>   ---------------------+-------------------------------------
>    embedded astyle     | a C++ compiler
>   ---------------------+-------------------------------------
>    clang-format        | clang-format of a specific version
>   ---------------------+-------------------------------------
>
> --strk;
>
>   ()   Free GIS & Flash consultant/developer
>   /\   https://strk.kbt.io/services.html
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel


More information about the postgis-devel mailing list