<div dir="ltr"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 18, 2018 at 2:44 PM, Amar Tumballi <span dir="ltr">&lt;<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="gmail-">On Tue, Sep 18, 2018 at 2:33 PM, Kotresh Hiremath Ravishankar <span dir="ltr">&lt;<a href="mailto:khiremat@redhat.com" target="_blank">khiremat@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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&#39;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></span><div>This is a bug.. please file an &#39;project-infrastructure&#39; bug to disable clang-format job in release branches (other than release-5 branch).</div></div></div></div></blockquote><div>ok, done <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1630259">https://bugzilla.redhat.com/show_bug.cgi?id=1630259</a> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>-Amar</div><div><div class="gmail-h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>- Kotresh HR<br></div></div><div class="gmail_extra"><div><div class="gmail-m_-4441292212837002702h5"><br><div class="gmail_quote">On Tue, Sep 18, 2018 at 2:13 PM, Ravishankar N <span dir="ltr">&lt;<a href="mailto:ravishankar@redhat.com" target="_blank">ravishankar@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
<br>
On 09/18/2018 02:02 PM, Hari Gowtham wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I see that the procedure mentioned in the coding standard document is buggy.<br>
<br>
git show --pretty=&quot;format:&quot; --name-only | grep -v &quot;contrib/&quot; | egrep<br>
&quot;*\.[ch]$&quot; | 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="gmail-m_-4441292212837002702m_-3206205727726581243HOEnZb"><div class="gmail-m_-4441292212837002702m_-3206205727726581243h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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 &lt;<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
On Mon, Sep 17, 2018 at 10:00 AM, Ravishankar N &lt;<a href="mailto:ravishankar@redhat.com" target="_blank">ravishankar@redhat.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
On 09/13/2018 03:34 PM, Niels de Vos wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Thu, Sep 13, 2018 at 02:25:22PM +0530, Ravishankar N wrote:<br>
...<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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 &#39;before and after&#39; 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Regards,<br>
Ravi<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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&#39;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="gmail-m_-4441292212837002702HOEnZb"><font color="#888888">-- <br><div class="gmail-m_-4441292212837002702m_-3206205727726581243gmail_signature"><div dir="ltr"><div>Thanks and Regards,<br></div>Kotresh H R<br></div></div>
</font></span></div>
</blockquote></div></div></div><span class="gmail-HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-4441292212837002702gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Thanks and Regards,<br></div>Kotresh H R<br></div></div>
</div></div></div>