[gdal-dev] Automating code style enforcement ?

Even Rouault even.rouault at spatialys.com
Fri May 5 00:22:04 PDT 2017


Hi Mateusz,

> Please, let's forget about astyle.

Because you consider it more limited feature-wise than clang-format ?
(https://trac.osgeo.org/geos/wiki/RFC4 : "wrapping long lines whether of code, strings, 
arrays - something which AStyle has no way of doing")

I'm wondering what you mean by "No automation of code reformatting is proposed. It would 
be treating the symptomps, no cause: developers not following the code formatting 
standard. "

I'd really want a script to fix edited files and fix them. From a quick look, it isn't obvious that 
my favorite text editor (kate) could ingest a .clang-format file to enforce the style when I'm 
editing. And honestly I don't even want to learn the rules of the style we would apply. We 
*need* something to fix it easily like scripts/prepare-commit[.sh/.py] that will check svn/git 
edited files and run them through the reformatter.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170505/8af9aaf4/attachment.html>


More information about the gdal-dev mailing list