<div dir="ltr">I had a look at that article and two things really jump out (in quotes here):<div><div class="gmail_extra">-------------------------------------------------------------</div><div><div class="gmail_extra">"The first thing that leapt out at me when looking at the full source of sslKeyExchange.c was a lack of consistency.<br><br>It bears all the hallmarks of a file which has been worked on by multiple developers who were not bound by a single set of comprehensive coding standards.<br>Immediately noticeable when the file is opened in an ordinary text editor (not a code editor or IDE), is that the indentation inconsistently mixes tabs and spaces.<br><br>The second thing I realised (relevant given the nature of this bug) is the inconsistency with regard to single-line conditional blocks. There are places where a conditional statement is enclosed in braces even when it is only a single line, and other places where it is not."</div><div class="gmail_extra">-------------------------------------------------------------</div><div class="gmail_extra">So yes, it is probably worthwhile looking at brace spacing etc.</div><div class="gmail_extra"><br></div><div class="gmail_extra">One of the strengths of VTK is its consistent coding style which does make it easy to spot bugs. So I agree with you Sean, lets adopt a coding style consistent with modern tools and then git hooks can be implemented supporting this. <span style="font-size:12.8px">vtk_reindent_code.py goes a long way towards doing this.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">It is frustrating at present that I have to manually modify spacing etc. since my main editors are Visual Studio, Sublime text3 using SublimeAStyleFormatter and sometimes Eclipse and QTCreator.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">Have a great Wednesday! Wish I lived closer.</span></div><div class="gmail_extra"><span style="font-size:12.8px"><br></span></div><div class="gmail_extra"><span style="font-size:12.8px">Regards</span></div><div class="gmail_extra"><span style="font-size:12.8px"> Andrew</span></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">---------- Forwarded message ----------<br>From: Sean McBride <<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>><br>To: Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>>, Paolo Quadrani <<a href="mailto:paolo.quadrani@gmail.com">paolo.quadrani@gmail.com</a>><br>Cc: VTK Developers <<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a>><br>Date: Mon, 4 Jul 2016 17:41:53 -0400<br>Subject: Re: [vtk-developers] Incorrect indentation by vtk_reindent_code.py<br>On Mon, 4 Jul 2016 15:57:46 -0400, Bill Lorensen said:<br>
<br>
>First, I have mixed emotions about massive changes to fix brace<br>
>spacing. Who benefits? Some developers, yes, the customer, no.<br>
<br>
Bill, I take your point, but missing braces and screwed up whitespace can cause real bugs, the most famous recent example being the goto fail bug:<br>
<<a href="https://blog.duncanworthy.me/swdev/ios/apple-ssl-goto-fail-bug/" rel="noreferrer" target="_blank">https://blog.duncanworthy.me/swdev/ios/apple-ssl-goto-fail-bug/</a>><br>
<br>
VTK's Whitesmiths style isn't supported by modern tools, and once we get away from it we can do things like autoformatting, git hooks that reject incorrect formatting, dashboard check of formatting, etc.<br>
<br>
See you guys Wednesday!<br>
<br>
Cheers,<br>
<br>
--<br>
____________________________________________________________<br>
Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research <a href="http://www.rogue-research.com" rel="noreferrer" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer Montréal, Québec, Canada<br>
<br>
<br></blockquote></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">___________________________________________<br>Andrew J. P. Maclean<br><br>___________________________________________</div>
</div></div></div></div>