On Feb 24, 2014 9:26 PM, "Derek Gaston" <friedmud@gmail.com> wrote:
>
> John,
>
> Thanks for working this out - I especially appreciate the gitconfig bit (BTW - you can add that just to your libMesh repo clones by modifying the .git/config file in just that repo).
>
> Also, I vote for:
>
>
>>   if (condition)
>>   {
>>     foo();
>>
>>     bar(); 
>>
>>   }
>
+1
>
>
> Derek
>  
>
>
> On Mon, Feb 24, 2014 at 12:42 PM, John Peterson <jwpeterson@gmail.com> wrote:
>>
>> Greetings,
>>
>> You may have noticed a large number of whitespace changes in master recently...
>>
>> These were made to:
>> 1.) Unify the indentation style used in the code.
>> 2.) Remove tab characters used for indentation.
>>
>> The indentation style is of course open for debate.  The current style is the one we've pretty much just used by default from the beginning of libmesh, and is encapsulated in the contrib/bin/reindent.sh script.  It is basically the default emacs C++ style with 0 extra offset inside namespaces.  This indentation style happens to add an extra level of indentation to lines containing curly braces, as in
>>
>>>   if (condition)
>>>     {
>>>       foo();
>>>
>>>       bar(); 
>>>
>>>     }
>>
>>
>> as opposed to:
>>
>>>   if (condition)
>>>   {
>>>     foo();
>>>
>>>     bar(); 
>>>
>>>   }
>>
>>
>>
>> This type of code seems to be what gets re-indented most frequently... I really don't care which style we go with, as long as it's consistent throughout the library.
>>
>>
>> The use of spaces vs. tab characters for tabs is controversial in some circles.  I currently prefer spaces-only because tab characters alone are not always sufficient to properly align code.  The github viewer, where I view a lot of diffs and patches these days, doesn't seem to be easily customizable regarding tab sizes (http://stackoverflow.com/questions/8833953/how-to-change-tab-size-on-github) hence my preference for spaces only.  Below are some handy editor configuration lines for using spaces for tabs, and for highlighting errant tab characters in git diff/log (I'm not a vim user, the vim part may be wrong).
>>
>> .vimrc: 
>> set tabstop=2
>> set shiftwidth=2
>> set expandtab
>>
>> .emacs:
>> (setq-default indent-tabs-mode nil)
>>
>> .gitconfig:
>> [core]
>>         whitespace = trailing-space,space-before-tab,tab-in-indent
>>
>>
>> Finally, I definitely feel that whitespace and indentation concerns shouldn't impede development, so there's no requirement that your commits must satisfy these requirements, but you should be aware that the tab removal and re-indentation scripts may get run periodically, creating unnecessary extra history...
>>
>> --
>> John
>>
>> ------------------------------------------------------------------------------
>> Flow-based real-time traffic analytics software. Cisco certified tool.
>> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
>> Customize your own dashboards, set traffic alerts and generate reports.
>> Network behavioral analysis & security monitoring. All-in-one tool.
>> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Libmesh-devel mailing list
>> Libmesh-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/libmesh-devel
>>
>
>
> ------------------------------------------------------------------------------
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> _______________________________________________
> Libmesh-devel mailing list
> Libmesh-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libmesh-devel
>