[postgis-devel] Code formatting digging in

Sandro Santilli strk at kbt.io
Thu Feb 22 12:08:50 PST 2018


On Thu, Feb 22, 2018 at 06:57:34PM +0000, Darafei "Komяpa" Praliaskouski wrote:
> Hi,
> 
> Two things are crucial about clang-format:
> 1. clang-format is part of clang/llvm, so it's reusing parts of the same
> engine that parses the code on compilation;

I don't see the benefit of this. I use GCC to compile, btw, so I'd
have to install clang-format separately.

> 2. clang-format ships git-clang-format that is able to format just a patch.

Only formatting the changed lines is an interesting idea,
but then how can we ensure style is retained ?

If we ever enforce a style we'll want CI to check style is the
official style, and not allow anything else, so we want a full
reformat anyway at that point.

> Sandro, are you looking on numbers from formatting just *.c files or *.c
> and *.h files?

Previously sent numbers were obtained with:

  make astyle
  git diff --stat | tail -1

--strk;


More information about the postgis-devel mailing list