diff options
author | barnboy%trilobyte.net <> | 2001-08-30 02:25:24 +0200 |
---|---|---|
committer | barnboy%trilobyte.net <> | 2001-08-30 02:25:24 +0200 |
commit | 58593ba9d058e7fdd2fbac2d45dafefcbc6bbb4e (patch) | |
tree | 84b3c63571a69482fda0375f9c375d7afa9c0cc3 /docs/html/bzhacking.html | |
parent | 073c47679819c3ff3bfd900c3b9ceeb176232432 (diff) | |
download | bugzilla-58593ba9d058e7fdd2fbac2d45dafefcbc6bbb4e.tar.gz bugzilla-58593ba9d058e7fdd2fbac2d45dafefcbc6bbb4e.tar.xz |
Buncha' release updates. Moved all images to
./images so we don't have multiple copies of the
same image, fixed these doc bugs (in no particular order):
94949
97070
97071
97114
96498
95970
96677
94953
96501
96679
97068
97191
97192
Diffstat (limited to 'docs/html/bzhacking.html')
-rw-r--r-- | docs/html/bzhacking.html | 231 |
1 files changed, 231 insertions, 0 deletions
diff --git a/docs/html/bzhacking.html b/docs/html/bzhacking.html new file mode 100644 index 000000000..5bb15b44f --- /dev/null +++ b/docs/html/bzhacking.html @@ -0,0 +1,231 @@ +<HTML +><HEAD +><TITLE +>Hacking Bugzilla</TITLE +><META +NAME="GENERATOR" +CONTENT="Modular DocBook HTML Stylesheet Version 1.61 +"><LINK +REL="HOME" +TITLE="The Bugzilla Guide" +HREF="index.html"><LINK +REL="UP" +TITLE="Useful Patches and Utilities for Bugzilla" +HREF="patches.html"><LINK +REL="PREVIOUS" +TITLE="The Quicksearch Utility" +HREF="quicksearch.html"><LINK +REL="NEXT" +TITLE="GNU Free Documentation License" +HREF="gfdl.html"></HEAD +><BODY +CLASS="SECTION" +BGCOLOR="#FFFFFF" +TEXT="#000000" +LINK="#0000FF" +VLINK="#840084" +ALINK="#0000FF" +><DIV +CLASS="NAVHEADER" +><TABLE +WIDTH="100%" +BORDER="0" +CELLPADDING="0" +CELLSPACING="0" +><TR +><TH +COLSPAN="3" +ALIGN="center" +>The Bugzilla Guide</TH +></TR +><TR +><TD +WIDTH="10%" +ALIGN="left" +VALIGN="bottom" +><A +HREF="quicksearch.html" +>Prev</A +></TD +><TD +WIDTH="80%" +ALIGN="center" +VALIGN="bottom" +>Appendix D. Useful Patches and Utilities for Bugzilla</TD +><TD +WIDTH="10%" +ALIGN="right" +VALIGN="bottom" +><A +HREF="gfdl.html" +>Next</A +></TD +></TR +></TABLE +><HR +ALIGN="LEFT" +WIDTH="100%"></DIV +><DIV +CLASS="SECTION" +><H1 +CLASS="SECTION" +><A +NAME="BZHACKING" +>D.5. Hacking Bugzilla</A +></H1 +><P +> What follows are some general guidelines for changing Bugzilla, and adhering to good coding practice while doing so. We've had some checkins in the past which ruined Bugzilla installations because of disregard for these conventions. Sorry for the lack of formatting; I got this info into the Guide on the day of 2.14 release and haven't formatted it yet. + </P +><P +CLASS="LITERALLAYOUT" +><br> +The following is a guide for reviewers when checking code into Bugzilla's<br> +CVS repostory at mozilla.org. If you wish to submit patches to Bugzilla,<br> +you should follow the rules and style conventions below. Any code that<br> +does not adhere to these basic rules will not be added to Bugzilla's<br> +codebase.<br> +<br> + 1. Usage of variables in Regular Expressions<br> +<br> + It is very important that you don't use a variable in a regular<br> + expression unless that variable is supposed to contain an expression.<br> + This especially applies when using grep. You should use:<br> +<br> + grep ($_ eq $value, @array);<br> +<br> + - NOT -<br> +<br> + grep (/$value/, @array);<br> +<br> + If you need to use a non-expression variable inside of an expression, be<br> + sure to quote it properly (using \Q..\E).<br> +<br> +Coding Style for Bugzilla<br> +-------------------------<br> +<br> +While it's true that not all of the code currently in Bugzilla adheres to<br> +this styleguide, it is something that is being worked toward. Therefore,<br> +we ask that all new code (submitted patches and new files) follow this guide<br> +as closely as possible (if you're only changing 1 or 2 lines, you don't have<br> +to reformat the entire file :).<br> +<br> + 1. Whitespace<br> +<br> + Bugzilla's prefered indentation is 4 spaces (no tabs, please).<br> +<br> + 2. Curly braces.<br> +<br> + The opening brace of a block should be on the same line as the statement<br> + that is causing the block and the closing brace should be at the same<br> + indentation level as that statement, for example:<br> +<br> + if ($var) {<br> + print "The variable is true";<br> + } else {<br> + print "Try again";<br> + }<br> +<br> + - NOT -<br> +<br> + if ($var)<br> + {<br> + print "The variable is true";<br> + }<br> + else<br> + {<br> + print "Try again";<br> + }<br> +<br> + 3. File Names<br> +<br> + File names for bugzilla code and support documention should be legal across<br> + multiple platforms. \ / : * ? " < > and | are all illegal characters for<br> + filenames on various platforms. Also, file names should not have spaces in<br> + them as they can cause confusion in CVS and other mozilla.org utilities.<br> +<br> + 4. Variable Names<br> +<br> + If a variable is scoped globally ($::variable) its name should be descriptive<br> + of what it contains. Local variables can be named a bit looser, provided the<br> + context makes their content obvious. For example, $ret could be used as a<br> + staging variable for a routine's return value as the line |return $ret;| will<br> + make it blatently obvious what the variable holds and most likely be shown<br> + on the same screen as |my $ret = "";|.<br> +<br> + 5. Cross Database Compatability<br> +<br> + Bugzilla was originally written to work with MySQL and therefore took advantage<br> + of some of its features that aren't contained in other RDBMS software. These<br> + should be avoided in all new code. Examples of these features are enums and<br> + encrypt().<br> +<br> + 6. Cross Platform Compatability<br> +<br> + While Bugzilla was written to be used on Unix based systems (and Unix/Linux is<br> + still the only officially supported platform) there are many who desire/need to<br> + run Bugzilla on Microsoft Windows boxes. Whenever possible, we should strive<br> + not to make the lives of these people any more complicated and avoid doing things<br> + that break Bugzilla's ability to run on multiple operating systems.<br> +<br> + </P +></DIV +><DIV +CLASS="NAVFOOTER" +><HR +ALIGN="LEFT" +WIDTH="100%"><TABLE +WIDTH="100%" +BORDER="0" +CELLPADDING="0" +CELLSPACING="0" +><TR +><TD +WIDTH="33%" +ALIGN="left" +VALIGN="top" +><A +HREF="quicksearch.html" +>Prev</A +></TD +><TD +WIDTH="34%" +ALIGN="center" +VALIGN="top" +><A +HREF="index.html" +>Home</A +></TD +><TD +WIDTH="33%" +ALIGN="right" +VALIGN="top" +><A +HREF="gfdl.html" +>Next</A +></TD +></TR +><TR +><TD +WIDTH="33%" +ALIGN="left" +VALIGN="top" +>The Quicksearch Utility</TD +><TD +WIDTH="34%" +ALIGN="center" +VALIGN="top" +><A +HREF="patches.html" +>Up</A +></TD +><TD +WIDTH="33%" +ALIGN="right" +VALIGN="top" +>GNU Free Documentation License</TD +></TR +></TABLE +></DIV +></BODY +></HTML +>
\ No newline at end of file |