On Sunday 24 June 2007 02:16, Erik Johansson wrote:
> I would like to get started with merging some code from erijo-dev to
> the newapi branch. But first I think we should agree on a common
> coding style. I have updated http://trac.licq.org/wiki/CodingStyle to
> reflect a discussion I had with Anders on #licq some time ago. I'm now
> posting it here so that Jon (and others) can give their input as well.
I've given some opinions in the past and we talked on IRC awhile ago as well.
The current version is acceptable for me. The only thing left is the
Commenting section. I think the following points should be added to it:
* Use Doxygen style comments for all function/class definitions. [1]
* When a bug is fixed, add comments to the changed code and reference the
bug number.
* Don't add useless comments [2]
Anything else that you can think of?
Jon
[1]
/// or /** ?
[2]
/** Do some work
*
* @return int
*/
int functionName()
{
// ...
// return the value of x
return x;
}
Insead of "return the value of x", a more descriptive comment should be
used. "Return the number of errors" ... "Return the return value from
otherFunc()"... If there is no other comment that will help improve the
readability of the code, don't write a comment.
--
________________________________________________________
Jon Keating ICQ: 16325723
[EMAIL PROTECTED] MSN: [EMAIL PROTECTED]
http://www.licq.org GPG: 2290A71F
http://www.thejon.org HOME: Minamiashigara, Japan