corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis E. Hamilton" <>
Subject RE: braces, indent and use of tabs.
Date Mon, 29 Dec 2014 05:00:35 GMT
This is the third time I'm sending this and it doesn't show up on the list.  I am using a different
sender address just to see what's up.

-- replying in-line to --
From: Peter Kelly [] 
Sent: Sunday, December 28, 2014 05:33
Subject: Re: {}, indent and use of tabs.

> On 28 Dec 2014, at 8:29 pm, Peter Kelly <> wrote:
> I suggest that we stick to a common convention, and furthermore propose to use the convention
already followed by the codebase:
> 1. Indentation is four spaces. No tabs (they can cause confusion due to people having
different editing settings).
> 2. Open brace follows if, while, do, structs, and enums on the same line. Open brace
starts on a new line for functions.
> 3. Unix line endings for all files (to avoid complications with diffs)

Incidentally I think this can be enforced with a git configuration option (can’t remember
off the top of my head, but am pretty sure there’s one that deals with line ending conversion
based on the platform).

    I think the use of soft tabs (use of spaces instead) and any help with formatting around
"{" ... "}" are handled in editors or manually depending on how one works on the source code.

    I will honor the K&R convention established by Peter.  

    The general rule of open-source etiquette is that folks who work on a code base honor
the conventions that are there and don't inject different formatting.  I will honor that.
 Thanks for being specific about it, Peter.

    The line-ending does have controls in SVN and Git configurations.  So long as a file is
known to be text, there are controls in place.  Here is GitHub on the subject, 

    Note that it is very important to be certain that Git knows what files *not* to make these
adjustments on, since it will damage binaries too when they are not excluded from treatment
as text.  I don't know how much this impacts PGP-signed material.

    I suggest the .gitattributes approach be set up in the Corinthia repository with text=auto
and the indicated examples.  After that is done, those of us using Windows may need to re-clone
the repository to have everything in sync.


Dr Peter M. Kelly

PGP key: <>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

View raw message