[bt-devel] New coding standards

Jaak Ristioja Ristioja at gmail.com
Sat Oct 10 03:55:54 MST 2009


Martin Gruner wrote:
> Hi developers,
> 
> today, as part of our first great BibleTime Bug-a-Thon (thanks to Thomas!), I 
> reformatted the entire codebase with astyle. From now on, there are a few 
> conventions regarding indentation, white space and formatting.
> 
> Please read the current status here: 
> http://devel.bibletime.info/wiki/Programming_Guidelines#Coding_style.
> 
> Most notably, we do NOT use tabs any more. Indentation is done by using four 
> spaces. Also, the opening bracket is on the same line as the keyword it 
> follows. Classes do indent, but namespaces do not.
> 
> If anybody has serious objections to these rules as outlined in the wiki, 
> please let us know what they are. We can still change the standard.
> 
> We WILL, however, reformat the codebase regularly with astyle, to ENFORCE the 
> standard we set for us. This is neccessary to ensure consistency and improved 
> readability. Automated reformatting can, however, only cover very few basic 
> rules. There are many more things that need to be worked out, agreed and 
> specified, which a reformatter cannot check, at least none that I know. (Does 
> anyone know something more flexible than astyle, a perltidy for C++?)

I'm currently looking at http://www.gnu.org/software/indent/ since
astyle definately made some things look a bit too weird, e.g.
constructors with initializer lists. Therefore I'm not sure whether
running a source code formatter on a regular basis is a good idea.

Jaak



More information about the bt-devel mailing list