[gdal-dev] Automating code style enforcement ?

Kurt Schwehr schwehr at gmail.com
Thu May 4 13:55:53 PDT 2017


Mateusz just created
https://trac.osgeo.org/gdal/wiki/rfc69_cplusplus_formatting and I'll be
cloning his https://trac.osgeo.org/geos/wiki/RFC4 with changes for GDAL.

On Thu, May 4, 2017 at 1:49 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> Hi,
>
>
>
> I've observed Kurt's continued efforts, over several months if not years,
> to set a consistant style to the code base and this is a much appreciated
> initiative. Now, as this touches the whole code base, I think this should
> be formalized, probably under the form of a RFC, so that this is shared
> among all developers. Currently as there's no automation, basically every
> committer will probably unconsciously "break" files that have been already
> reformatted, which is a waste of time that could be avoided (and on a minor
> note we could save extra reformatting commits that are noise in the
> history, and extra bits to parse for the human preparing a changelog)
>
>
>
> I've seen in other projects, like QGIS, a script (in QGIS, they rely on
> astyle ultimately. not saying we should necessary use astyle) that takes
> care of reformatting automatically the files to be committed given the
> rules. That way the effort is spread on all contributors (and it is not a
> big deal to run this script). We could also have in Travis-CI a check so
> that pull requests are verified to respect the style (currently, we have
> already a very adhoc scripts/detect_tabulations.sh to check that no
> tabulation characters are used)
>
>
>
> Even
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
--
http://schwehr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170504/8c3b0dec/attachment.html>


More information about the gdal-dev mailing list