There are a few rules to follow when making a patch for ChatZilla. Some of them are dead simple, others might not be. If you're fuzzy on a particular rule, check for examples in the source, or just ask. Hopefully the rules won't scare off potential patch makers. They may be a bit pedantic, but they help keep things consistent.
1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890CORRECT:
if (someObject.propertyWithALongName && reallyLongFunctionName() && someOtherFlag) { const nsISample = Components.interfaces.nsISample; const CTRID_SAMPLE = "@mozilla.org/sample"; var sample = Components.classes[CTRID_SAMPLE].createInstance(nsISample); }INCORRECT:
if (someObject.propertyWithALongName && reallyLongFunctionName() && someOtherFlag) { var sample = Components.classes["@mozilla.org/sample"].createInstance(Components.interfaces.nsISample); var sample = Components.classes["@mozilla.org/sample"]. createInstance(Components.interfaces.nsISample); var sample = Components.classes["@mozilla.org/sample"].createInstance( Components.interfaces.nsISample); }
if (foo) bar(); if (foo) { bar(); baz(); } while (foo && ... && bar) { baz(); } if (foo) bar(); else if (baz) quux(); if (foo) { bar(); } else { baz(); quux(); }INCORRECT:
if (foo) bar(); if (foo) { bar(); baz(); } if (foo) bar() else { baz(); quux(); }
if (a) return; b();INCORRECT:
if (a) return; else b();