<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 18, 2018 at 2:33 PM, Kotresh Hiremath Ravishankar <span dir="ltr"><<a href="mailto:khiremat@redhat.com" target="_blank">khiremat@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>I have a different problem. clang is complaining on the 4.1 back port of a patch which is merged in master before<br></div>clang-format is brought in. Is there a way I can get smoke +1 for 4.1 as it won't be neat to have clang changes<br></div>in 4.1 and not in master for same patch. It might further affect the clean back ports.<br></div><div><br></div></div></blockquote><div><br></div><div>This is a bug.. please file an 'project-infrastructure' bug to disable clang-format job in release branches (other than release-5 branch).</div><div><br></div><div>-Amar</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>- Kotresh HR<br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Sep 18, 2018 at 2:13 PM, Ravishankar N <span dir="ltr"><<a href="mailto:ravishankar@redhat.com" target="_blank">ravishankar@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
<br>
On 09/18/2018 02:02 PM, Hari Gowtham wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I see that the procedure mentioned in the coding standard document is buggy.<br>
<br>
git show --pretty="format:" --name-only | grep -v "contrib/" | egrep<br>
"*\.[ch]$" | xargs clang-format -i<br>
<br>
The above command edited the whole file. which is not supposed to happen.<br>
</blockquote></span>
It works fine on fedora 28 (clang version 6.0.1). I had the same problem you faced on fedora 26 though, presumably because of the older clang version.<br>
-Ravi<div class="m_-3206205727726581243HOEnZb"><div class="m_-3206205727726581243h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
+1 for the readability of the code having been affected.<br>
On Mon, Sep 17, 2018 at 10:45 AM Amar Tumballi <<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
On Mon, Sep 17, 2018 at 10:00 AM, Ravishankar N <<a href="mailto:ravishankar@redhat.com" target="_blank">ravishankar@redhat.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 09/13/2018 03:34 PM, Niels de Vos wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, Sep 13, 2018 at 02:25:22PM +0530, Ravishankar N wrote:<br>
...<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What rules does clang impose on function/argument wrapping and alignment? I<br>
somehow found the new code wrapping to be random and highly unreadable. An<br>
example of 'before and after' the clang format patches went in:<br>
<a href="https://paste.fedoraproject.org/paste/dC~aRCzYgliqucGYIzxPrQ" rel="noreferrer" target="_blank">https://paste.fedoraproject.or<wbr>g/paste/dC~aRCzYgliqucGYIzxPrQ</a> Wondering if<br>
this is just me or is it some problem of spurious clang fixes.<br>
</blockquote>
I agree that this example looks pretty ugly. Looking at random changes<br>
to the code where I am most active does not show this awkward<br>
formatting.<br>
</blockquote>
<br>
So one of my recent patches is failing smoke and clang-format is insisting [<a href="https://build.gluster.org/job/clang-format/22/console" rel="noreferrer" target="_blank">https://build.gluster.org/job<wbr>/clang-format/22/console</a>] on wrapping function arguments in an unsightly manner. Should I resend my patch with this new style of wrapping ?<br>
<br>
</blockquote>
I would say yes! We will get better, by changing options of clang-format once we get better options there. But for now, just following the option suggested by clang-format job is good IMO.<br>
<br>
-Amar<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Regards,<br>
Ravi<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
However, I was expecting to see enforcing of the<br>
single-line-if-statements like this (and while/for/.. loops):<br>
<br>
if (need_to_do_it) {<br>
do_it();<br>
}<br>
<br>
instead of<br>
<br>
if (need_to_do_it)<br>
do_it();<br>
<br>
At least the conversion did not take care of this. But, maybe I'm wrong<br>
as I can not find the discussion in <a href="https://bugzilla.redhat.com/1564149" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/15<wbr>64149</a><br>
about this. Does someone remember what was decided in the end?<br>
<br>
Thanks,<br>
Niels<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
--<br>
Amar Tumballi (amarts)<br>
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="https://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">https://lists.gluster.org/mail<wbr>man/listinfo/gluster-devel</a><br>
</blockquote>
<br>
<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="https://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">https://lists.gluster.org/mail<wbr>man/listinfo/gluster-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-3206205727726581243gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Thanks and Regards,<br></div>Kotresh H R<br></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</div></div>