<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 11, 2021 at 5:50 PM Yaniv Kaul &lt;<a href="mailto:ykaul@redhat.com">ykaul@redhat.com</a>&gt; wrote:<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 dir="ltr"><div style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 11, 2021 at 5:54 PM Amar Tumballi &lt;<a href="mailto:amar@kadalu.io" target="_blank">amar@kadalu.io</a>&gt; wrote:<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="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 11 Feb, 2021, 9:19 pm Xavi Hernandez, &lt;<a href="mailto:xhernandez@redhat.com" target="_blank">xhernandez@redhat.com</a>&gt; wrote:<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 dir="ltr">On Wed, Feb 10, 2021 at 1:33 PM Amar Tumballi &lt;<a href="mailto:amar@kadalu.io" rel="noreferrer" target="_blank">amar@kadalu.io</a>&gt; wrote:<br></div><div class="gmail_quote"><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 dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 10, 2021 at 3:29 PM Xavi Hernandez &lt;<a href="mailto:xhernandez@redhat.com" rel="noreferrer" target="_blank">xhernandez@redhat.com</a>&gt; wrote:<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">Hi all,<div><br></div><div>I&#39;m wondering if enforcing clang-format for all patches is a good idea...</div><div><br></div><div>I&#39;ve recently seen patches where clang-format is doing changes on parts of the code that have not been touched by the patch. Given that all files were already formatted by clang-format long ago, this shouldn&#39;t happen.</div><div><br></div><div>This means that as the clang-format version evolves, the formatting with the same configuration is not the same. This introduces unnecessary noise to the file history that I think it should be avoided.</div><div><br></div><div>Additionally, I&#39;ve also seen some cases where some constructs are reformatted in an uglier or less clear way. I think it&#39;s very hard to come up with a set of rules that formats everything in the best possible way.</div><div><br></div><div>For all these reasons, I would say we shouldn&#39;t enforce clang-format to accept a PR. I think it&#39;s a good test to run to catch some clear formatting issues, but it shouldn&#39;t vote for patch acceptance.</div><div><br></div><div>What do you think ?</div><div><br></div></div></blockquote><div><br></div><div>One thing I have noticed is, as long as some test is &#39;skipped&#39;, no one bothers to check. It would be great if the whole diff (in case of failure) is posted as a comment, so we can consider that while merging. I would request one to invest time on posting the failure message as a comment back into issue from jenkins if possible, and later implement skip behavior. Otherwise, considering we have &gt;10 people having ability to merge patches, many people may miss having a look on clang-format issues.</div></div></div></blockquote><div><br></div><div>I agree that it could be hard to enforce some rules, but what I&#39;m seeing lately is that the clang-format version from Fedora 33 doesn&#39;t format the code the same way as a previous version with the same configuration in some cases (this also seems to happen with much older versions). This causes failures in the clang check that need manual modifications to update the patches.</div><div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Ok, let&#39;s get moving with actual work than syntaxes. Ok with skipping!</div></div></blockquote></div></div></blockquote><div><br></div><div>Before skipping I think it would be interesting to see if your idea of posting the result of the clang-format test as a review comment with the suggested changes is possible. It would be very easy then to check if they make sense or not before merging.</div><div><br></div><div><a class="gmail_plusreply" id="plusReplyChip-0" href="mailto:dkhandel@redhat.com" tabindex="-1">@Deepshikha Khandelwal</a> do you know if it&#39;s possible ?<br></div><div><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_quote"><div><br></div><div style="font-family:arial,helvetica,sans-serif">If we could run a specific version within a container...</div></div></div></blockquote><div><br></div><div>Even if we run it inside a container, sooner or later that container will need to be upgraded to newer versions of software and libraries. When clang-format is upgraded, patches will start modifying things that the author didn&#39;t really touch, adding unnecessary and undocumented changes to the gluster history. Additionally, it&#39;s not possible to automatically format everything in the best possible way because in some cases one format will be better than another (for example for readability), but in some other cases the same code structure will be better represented in another way.</div><div><br></div><div>We have the possibility of disabling clang-format in specific parts of the code via a special comment, but I&#39;m not sure if it&#39;s the right solution either.</div><div><br></div><div>Regards,</div><div><br></div><div>Xavi</div><div><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_quote"><div style="font-family:arial,helvetica,sans-serif">Y.</div><div style="font-family:arial,helvetica,sans-serif"></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="auto"><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><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_quote"><div><br></div><div>Xavi</div></div></div>
</blockquote></div></div></div>
-------<br>
<br>
Community Meeting Calendar:<br>
Schedule -<br>
Every 2nd and 4th Tuesday at 14:30 IST / 09:00 UTC<br>
Bridge: <a href="https://meet.google.com/cpu-eiue-hvk" rel="noreferrer" target="_blank">https://meet.google.com/cpu-eiue-hvk</a><br>
<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/mailman/listinfo/gluster-devel</a><br>
<br>
</blockquote></div></div>
</blockquote></div></div>