<div dir="ltr"><div>I hope I&#39;ve made the changes that Jeff&#39;s recommended in the first comment correctly[1]. Xavi, I&#39;ve not pulled in any of your suggestions yet, because I figured you&#39;d want to see the output and send suggestions.</div><div><br></div><div>Please send pull requests to the .clang-format file (and only that file) for anything I&#39;ve missed or anything you think needs changing. I&#39;ll do the re-generation so we&#39;re not stuck with merge conflicts.</div><div><br></div><div>[1]: <a href="https://github.com/nigelbabu/clang-format-sample/commit/733394939034ff9baaf579e7f327bdd078f204ef">https://github.com/nigelbabu/clang-format-sample/commit/733394939034ff9baaf579e7f327bdd078f204ef</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 23, 2018 at 12:58 PM,  <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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><p>Planning to postpone this meeting, and idea is to work in more collaborated way off-line, instead of being in a meeting. we believe it would give everyone (those who didn&#39;t attend) too a fair chance to submit their opinion.</p><p>For now, we will continue with Nigel&#39;s clang-format repo for this to experiment with different options. [<a href="https://github.com/nigelbabu/clang-format-sample" target="_blank">https://github.com/nigelbabu/<wbr>clang-format-sample</a>]</p><p>The plan on this is to go with a sample gluster file, which would have complex macros, a call with STACK_WIND/UNWIND function call. A switch case, a for loop, a do/while loop. Also a list_for_each loop. Have locked region. A sample 4-5 level depth if/else checks, etc. </p><p>With this sample file, having the .clang-format decided as either Chromium or Mozilla as a base (with IndentSize set to 4 space), would be a good start. We will also make sure to have  all the agreed points in bugzilla, and add it to clang-format file, and also regenerate the sample file. So, everyone gets an idea how the target file would look like. If everyone agrees, by the end of the week, we will have an agreement, so we can go ahead and make this possible before 4.1 release branching. (So, our backport efforts will be reduced drastically).</p><p>-Amar</p><p></p><p></p><p></p><p></p></span><span><span style="display:none"></span><span><div><table summary="" style="width:100%;font-family:Arial,Sans-serif;border:1px Solid #ccc;border-width:1px 2px 2px 1px;background-color:#fff" cellspacing="0" cellpadding="8" border="0"><tbody><tr><td><div style="padding:2px"><span></span><h3 style="padding:0 0 6px 0;margin:0;font-family:Arial,Sans-serif;font-size:16px;font-weight:bold;color:#222"><span>Coding Standard: Automation</span></h3><div style="padding-bottom:15px;font-family:Arial,Sans-serif;font-size:13px;color:#222;white-space:pre-wrap!important;white-space:-moz-pre-wrap!important;white-space:-pre-wrap!important;white-space:-o-pre-wrap!important;white-space:pre-wrap;word-wrap:break-word"><span>BJ: <a href="https://www.google.com/url?q=https%3A%2F%2Fbluejeans.com%2F205933580&amp;sa=D&amp;ust=1524475718810000&amp;usg=AFQjCNGTaaNTzaWd-W-uynMJetu6B5iKrw" target="_blank">https://bluejeans.com/<wbr>205933580</a><br><br>We will talk and come to agreement on <a href="https://www.google.com/url?q=https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1564149&amp;sa=D&amp;ust=1524475718811000&amp;usg=AFQjCNFdx9TMiO-6fNfyyQFlI-P_1ewpHg" target="_blank">https://bugzilla.redhat.<wbr>com/show_bug.cgi?id=1564149</a><br><br>It was agreed that we will go ahead with format change automation, so, goal of this meeting is to pick the right options.<br><br>Goal is to get gluster&#39;s own `.clang-format` file. Once that file is agreed upon, we will go ahead and create a job for fixing the patches for format, and also fix the codebase to get the formats.<br><br>Pre-work if you are interested, read about : <a href="https://www.google.com/url?q=https%3A%2F%2Fclang.llvm.org%2Fdocs%2FClangFormatStyleOptions.html&amp;sa=D&amp;ust=1524475718811000&amp;usg=AFQjCNFHjwiLZMlDA3zDhSI4kPiYozHRlg" target="_blank">https://clang.llvm.org/docs/<wbr>ClangFormatStyleOptions.html</a><br><br>Also pick a gluster file which would pass through agreed format, so you can validate how it looks after formatting. Instead of waiting for this to happen, we can see is this good enough?<br><br>Few things we mostly agree:<br><br><pre> !<wbr>AllowShortIfStatementsOnASingl<wbr>eLine !AllowShortLoopsOnASingleLine BraceWrapping(!<wbr>AfterControlStatement) BraceWrapping(AfterFunction) BraceWrapping(!BeforeElse) ColumnLimit(80) IndentWidth(4) PointerAlignment(PAS_Right) SpaceBeforeParens(SBPO_Always) TabWidth(8) UseTab(UT_Never)</pre><br><pre><span>  BinPackParameters=true</span></pre><pre><font face="Roboto, Helvetica, Arial, sans-serif">  </font>AlignEscapedNewLinesLeft=false</pre><pre> AlignConsecutiveDeclarations=<wbr>true</pre><pre><span>  AlignConsecutiveAssignments=<wbr>true</span></pre><pre> AlwaysBreakAfterReturnType = true</pre><br><br>More options which we can discuss:<br><pre>!IndentCaseLabels<span>SpaceBeforePa<wbr>rens = ControlStatements</span> </pre><pre><br></pre><br>I propose two steps as preventing history:<br><br>* The commit before the mass-format-change commit will maintained as a separate branch. (No cost of space, but everyone clearly knows where to go for history, when git blame pointing to the commit of mass changes).<br>* Similarly, to get history of pre-2009 (currently &#39;historic&#39; repo), I personally feel moving  <a href="https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Famarts%2Fglusterfs%2Fcommits%2Fgit-based-history-from-historic&amp;sa=D&amp;ust=1524475718817000&amp;usg=AFQjCNFqMDCu47TjNU2abBOcA22hvqWInw" target="_blank">https://github.com/amarts/<wbr>glusterfs/commits/git-based-<wbr>history-from-historic</a>, as a separate branch in gluster/glusterfs would help. Again, today people has to switch repositories for this.</span></div><table summary="Event details" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="padding:0 1em 10px 0;font-family:Arial,Sans-serif;font-size:13px;color:#888;white-space:nowrap" valign="top"><div><i style="font-style:normal">When</i></div></td><td style="padding-bottom:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222" valign="top"><time datetime="20180423T123000Z"></time><time datetime="20180423T132000Z"></time>Mon Apr 23, 2018 6pm – 6:50pm <span style="color:#888">India Standard Time</span></td></tr><tr><td style="padding:0 1em 10px 0;font-family:Arial,Sans-serif;font-size:13px;color:#888;white-space:nowrap" valign="top"><div><i style="font-style:normal">Who</i></div></td><td style="padding-bottom:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222" valign="top"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><span style="font-family:Courier New,monospace">•</span></td><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><div><div style="margin:0 0 0.3em 0"><span><span class="notranslate"><a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a></span></span><span></span><span style="font-size:11px;color:#888"> - organizer</span></div></div></td></tr><tr><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><span style="font-family:Courier New,monospace">•</span></td><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><div><div style="margin:0 0 0.3em 0"><span><span class="notranslate"><a href="mailto:jeff@pl.atyp.us" target="_blank">jeff@pl.atyp.us</a></span></span></div></div></td></tr><tr><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><span style="font-family:Courier New,monospace">•</span></td><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><div><div style="margin:0 0 0.3em 0"><span><span class="notranslate"><a href="mailto:nbabu@redhat.com" target="_blank">nbabu@redhat.com</a></span></span></div></div></td></tr><tr><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><span style="font-family:Courier New,monospace">•</span></td><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><div><div style="margin:0 0 0.3em 0"><span><span class="notranslate"><a href="mailto:srangana@redhat.com" target="_blank">srangana@redhat.com</a></span></span></div></div></td></tr><tr><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><span style="font-family:Courier New,monospace">•</span></td><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><div><div style="margin:0 0 0.3em 0"><span><span class="notranslate"><a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a></span></span></div></div></td></tr><tr><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><span style="font-family:Courier New,monospace">•</span></td><td style="padding-right:10px;font-family:Arial,Sans-serif;font-size:13px;color:#222"><div><div style="margin:0 0 0.3em 0"><span><span class="notranslate"><a href="mailto:jahernan@redhat.com" target="_blank">jahernan@redhat.com</a></span></span></div></div></td></tr></tbody></table></td></tr></tbody></table></div></td></tr></tbody></table></div></span></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">nigelb<br></div></div>
</div>