[postgis-devel] Code formatting digging in

Darafei "Komяpa" Praliaskouski me at komzpa.net
Fri Mar 2 02:49:23 PST 2018


>
> >> > https://github.com/postgis/postgis/blob/svn-trunk/STYLE#L27
> >>
> >>  I'm perfectly fine with spirit, though others may feel differently.
>
> > I'm fine with the spirit, it's just the implementation which lacks:
> > when we tried, the "run astyle" step produced different output for
> different people.
> How about we don't run astyle or just run once in a while (as we've been
> doing) and have someone tasked to do it stuck with some version of astryl,
> or just relegate it to a bot.
>

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.

I'd rather not even have to have the hassle of running astyle.  I was all
> happy with editorconfig as it did not
> slow down my workflow or require one more thing for my fading memory to
> remember to do.
>
> I'm still lost at this obsession of perfectly consistent formatting.


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

The main reason I formatted lwgeom_geos.c file completely was it having
unmatched indentation levels that are hard to find manually.
After you meet first one of them you're not really sure whether the rest of
the performs in the way it is formatted, or a { hides somewhere between
#ifdefs and changes bounds of a block.

Such things are probably not an issue for original authors as they remember
what they were doing, and it works in rough "one developer per subsystem"
model, but breaks as you get more people fixing old issues on board.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20180302/6fd63d9d/attachment.html>


More information about the postgis-devel mailing list