[bt-devel] New coding standards

Martin Gruner mg.pub at gmx.net
Fri Oct 9 12:56:16 MST 2009


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++?)

Regards, Martin

-- 

Bauplan des Lebens - längst im Gen entdeckt!
Die Wissenschaft ist stolz: Sie hat's gecheckt.
Nun ist der Bauplan als Beweis beliebt,
dass es den Architekten gar nicht gibt.

Wolf Rahn



More information about the bt-devel mailing list