[postgis-devel] Code formatting digging in

Sandro Santilli strk at kbt.io
Wed Feb 28 08:09:23 PST 2018


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


More information about the postgis-devel mailing list