[petsc-dev] Style Guide: How to format single-line if/for/while-blocks?

Jed Brown jedbrown at mcs.anl.gov
Mon Jan 21 22:02:34 CST 2013


On Mon, Jan 21, 2013 at 9:49 PM, Mark F. Adams <mark.adams at columbia.edu>wrote:

> And some folks don't like "egyptian" braces and want { on its own line,
> and why not if } needs its own line why not  { ?


Because it eats up more precious vertical space. ;-)

The way I see it, if you can get uncrustify to format it your way and to
put it back into canonical form, then you're welcome to edit however you
like. Note that if you change line numbers, you won't be able to translate
as easily from emails and bitbucket diffs (they will have "clean"
repository formatting).

If anyone wants to do this with git, I can show you how. I think you'll
find it's not as nice to work with as you may have hoped, not through a
failing of the tool, but because we also communicate through side channels.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130121/1adc664e/attachment.html>


More information about the petsc-dev mailing list