[gdal-dev] SortIncludes was Re: Motion: adopt RFC69 C/C++ Code Formatting

ElPaso elpaso at itopen.it
Thu Nov 24 02:21:16 PST 2022


Il 24/11/22 10:55, Andrew C Aitchison ha scritto:
> On Thu, 24 Nov 2022, ElPaso wrote:
>
>> Hi,
>>
>> Motion:
>>
>> Adopt RFC88: RFC69 C/C++ Code Formatting [1]
>>
>> I have updated the RFC [1] to use pre-commit and I have created a 
>> draft implementation of the pre-commit hook and the CI integration 
>> with a GH workflow [2].
>>
>> If adopted, we still have to agree on which coding style to apply 
>> (for now I used a clang-format file I've found under gdal/scripts), 
>> but the biggest decision is wether proceed with an initial "Big 
>> Reformat" or an incremental one, my draft implementation supports both.
>>
>> Kind regards.
>>
>> [1] 
>> https://github.com/elpaso/gdal/blob/rfc69_cplusplus_formatting-text-only/doc/source/development/rfc/rfc69_cplusplus_formatting.rst
>> [2] 
>> https://github.com/elpaso/gdal/tree/rfc69_cplusplus_formatting_revival
>
> I have just tried this on my driver code and am concerned that the
> default sets --sort-includes.

[...]


> So without tweaking, clang-format is potentially breaking my code.
> I fear that we need a project .clang-formats file with atleast
> SortIncludes:    false
>

Good point, added: 
https://github.com/elpaso/gdal/commit/c54d54d209ce28c2017b3ebb0bcc1d23c5472693


-- 
Alessandro Pasotti
w3: www.itopen.it



More information about the gdal-dev mailing list