[postgis-devel] Code formatting digging in

Sandro Santilli strk at kbt.io
Fri Mar 2 13:05:15 PST 2018


On Fri, Mar 02, 2018 at 10:49:23AM +0000, Darafei "Komяpa" Praliaskouski wrote:

> I volunteer to commit to maintain consistent PostGIS codebase formatting as
> responsibility in project.
> 
> That would save everyone the hassle of thinking about styling, finding
> exact version numbers of software they don't care about, and get no
> frustration of broken CI because of code white space and not logic.

How do you plan to do that ?
I'd like to avoid a change history like:

 r2000 Fix bug
 r2001 Format
 r2002 Add feature
 r2003 Format
 ...

Avoiding that would imply a pre-commit processing.

> Perfectly consistent formatting just comes as a freebie when you use a
> formatter.

A _consistent_ formatter, that is ...

> The main reason I formatted lwgeom_geos.c file completely was it having
> unmatched indentation levels that are hard to find manually.

Theoretically those should be taken care of by editorconfig, does
your editor support it ? Does it change all lines on exit or just
the ones you tweak ?

--strk;


More information about the postgis-devel mailing list