<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I'm pretty sure that in the past I've fought against issues
related to include orders, at least on some platforms, and some
things were beyond our control (system headers or dependency
headers), so I think it is best to exclude it for now as
Alessandro just did for something that is intended to be stylistic
only and should have zero influence on the resulting binary code.<br>
</p>
<div class="moz-cite-prefix">Le 24/11/2022 à 12:24, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKur5U_t_Aosyu8eegBYWazA7S5qb-4enVJ=S+vw+wC2Sg@mail.gmail.com">
<div dir="auto">In my opinion if the order of the includes affects
the output there is something wrong in the code. I hope md5 is
not recommending the order.
<div dir="auto"><br>
</div>
<div dir="auto">I find the ordering feature very useful as a way
to detect those errors (not definitive because it is not
testing every combination, but a fixed criterion is good).<br>
<div dir="auto"><br>
</div>
<div dir="auto">In case you insist on keeping the order
defined by the user (more for aesthetic reasons usually) you
can just add a newline to separate the includes in blocks.
Clang-format keeps the contiguous blocks independent.</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, 24 Nov 2022, 11:21
ElPaso, <<a href="mailto:elpaso@itopen.it"
moz-do-not-send="true" class="moz-txt-link-freetext">elpaso@itopen.it</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote">Il 24/11/22 10:55, Andrew C
Aitchison ha scritto:<br>
> On Thu, 24 Nov 2022, ElPaso wrote:<br>
><br>
>> Hi,<br>
>><br>
>> Motion:<br>
>><br>
>> Adopt RFC88: RFC69 C/C++ Code Formatting [1]<br>
>><br>
>> I have updated the RFC [1] to use pre-commit and I
have created a <br>
>> draft implementation of the pre-commit hook and the
CI integration <br>
>> with a GH workflow [2].<br>
>><br>
>> If adopted, we still have to agree on which coding
style to apply <br>
>> (for now I used a clang-format file I've found under
gdal/scripts), <br>
>> but the biggest decision is wether proceed with an
initial "Big <br>
>> Reformat" or an incremental one, my draft
implementation supports both.<br>
>><br>
>> Kind regards.<br>
>><br>
>> [1] <br>
>> <a
href="https://github.com/elpaso/gdal/blob/rfc69_cplusplus_formatting-text-only/doc/source/development/rfc/rfc69_cplusplus_formatting.rst"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/elpaso/gdal/blob/rfc69_cplusplus_formatting-text-only/doc/source/development/rfc/rfc69_cplusplus_formatting.rst</a><br>
>> [2] <br>
>> <a
href="https://github.com/elpaso/gdal/tree/rfc69_cplusplus_formatting_revival"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/elpaso/gdal/tree/rfc69_cplusplus_formatting_revival</a><br>
><br>
> I have just tried this on my driver code and am concerned
that the<br>
> default sets --sort-includes.<br>
<br>
[...]<br>
<br>
<br>
> So without tweaking, clang-format is potentially breaking
my code.<br>
> I fear that we need a project .clang-formats file with
atleast<br>
> SortIncludes: false<br>
><br>
<br>
Good point, added: <br>
<a
href="https://github.com/elpaso/gdal/commit/c54d54d209ce28c2017b3ebb0bcc1d23c5472693"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/elpaso/gdal/commit/c54d54d209ce28c2017b3ebb0bcc1d23c5472693</a><br>
<br>
<br>
-- <br>
Alessandro Pasotti<br>
w3: <a href="http://www.itopen.it" rel="noreferrer
noreferrer" target="_blank" moz-do-not-send="true">www.itopen.it</a><br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank"
rel="noreferrer" moz-do-not-send="true"
class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>