Changes

Jump to: navigation, search

SeaMonkey:MailNews:CodingStyle

405 bytes added, 16:46, 25 August 2009
Default bracing style is "curly braces go on their own line"
}
There are quite some (old) files in our codebase which entirely adhere to the "opening curly braces go at the end of a line" style. If you do changes there, please keep the file's coding style consistent. Mixed coding styles only makes things worse.
 
Empty blocks, e.g. when implementing interfaces or <tt>try</tt>ing to <tt>catch</tt> exceptions, should really be empty and can go at the end of the line if needed:
// implement nsIFolderListener
var folderListener =
{
OnItemAdded: function(parentItem, item) {},
OnItemRemoved: function(parentItem, item)
{
try
{
SomethingWhichThrows();
}
catch (ex) {}
}
};
==== If one <tt>if</tt> branch needs braces, the other should have braces as well ====
235
edits

Navigation menu