5 Beagle's source repository is in GNOME CVS, in the module 'beagle'.
7 For information on GNOME CVS, see:
8 http://developer.gnome.org/tools/cvs/html.
14 If you have a patch you'd like to submit, please open a tracking bug on
15 bugzilla.gnome.org (product 'beagle'). Attach the patch (and any additional
16 required files) to the bug. The core developers are all on the beagle-bugs
17 mailing list, so we'll see that it is there. We will review it, but if people
18 are busy it might not happen right away.
20 In the past we'd been doing patch review on the mailing list, but that hasn't
21 always worked very well. Sometimes patches get lost in the shuffle.
27 Code that parses files or otherwise interacts w/ low-level details from
28 third-party apps (i.e. parsing gaim logs, undocumented nautilus metafiles and
29 stuff from .gnome2/epiphany, etc.) should probably be broken out into small
30 chunks of semi-independent code and placed in Beagle/Util. That kind of code
31 is just ugly by nature, and I want to keep it from getting mixed into the
32 beagle code as much as possible.
34 Anything in Util that requires gtk+ or gnome should be added to the UiUtil.dll
35 assembly. Otherwise, add it to the Util.dll assembly.
41 Beagle attempts to follow the Mono coding conventions. The following
42 description of those conventions was shamelessly stolen from Dashboard's
47 If there is a bug in your implementation tag the problem by using
48 the word "FIXME" in the code, together with a description of the
51 Do not use XXX or TODO or obscure descriptions, because
52 otherwise people will not be able to understand what you mean.
55 * Basic code formatting
57 In order to keep the code consistent, please use the following
58 conventions. From here on `good' and `bad' are used to attribute
59 things that would make the coding style match, or not match. It is not
60 a judgement call on your coding abilities, but more of a style and
61 look call. Please follow these guidelines to ensure prettiness.
63 Use 8 space tabs for writing your code.
65 Since we are using 8-space tabs, you might want to consider the Linus
66 Torvalds trick to reduce code nesting. Many times in a loop, you will
67 find yourself doing a test, and if the test is true, you will
68 nest. Many times this can be changed. Example:
71 for (i = 0; i < 10; i++) {
77 This take precious space, instead write it like this:
79 for (i = 0; i < 10; i++) {
87 * Use a space before an opening parenthesis when calling
88 functions, or indexing, like this:
93 * Do not put a space after the opening parenthesis and the
96 good: Method (a); array [10];
98 bad: Method ( a ); array[ 10 ];
100 * Inside a code block, put the opening brace on the same line
116 * Avoid using unnecessary open/close braces, vertical space
128 * However, when defining loops where the subpart could be
129 considered one statement, use open/close braces for
130 clarity. For example:
144 * When defining a method, use the C style for brace placement,
145 that means, use a new line for the brace, like this:
156 * Properties and indexers are an exception, keep the
157 brace on the same line as the property declaration.
158 Rationale: this makes it visually
159 simple to distinguish them.
176 Notice how the accessor "get" also keeps its brace on the same
179 For very small properties, you can compress things:
183 get { return value; }
187 * Use white space in expressions liberally, except in the presence
192 if (a + 5 > Method (Blah () + 4))
195 if (a+5>Method(Blah()+4))
197 * This also applies for "for" loops:
200 for (int i = 0; i < 100; i++)
203 for (int i=0;i<100;i++)
205 * Please also use spaces and clear language (capitalization,
206 punctuation) in comments:
209 // It's going to crash if we're not careful.
212 //its going to crash if were not careful
214 * For any new files, please use a descriptive introduction, like
218 // System.Comment.cs: Handles comments in System files.
220 // Copyright (C) 2002 Address, Inc. (http://www.address.com)
223 * Also remember to include the license in comments at the top of
224 the file. Cut-and-paste this out of other source files in the
227 * Switch statements have the case at the same indentation as the
237 * Large switch statements should have blank lines
238 between case statements:
252 * All method names and properties should be StudlyCapped.
254 * Private variable members of a class and function
255 local variable names should be under_scored (no
258 * C# is a pretty verbose and heavily-nested language. Don't
259 worry about trying to fit everything into 80 columns.
260 However, don't be afraid to use multiple lines, especially
261 with function arguments when it may be easier to read or
262 more aesthetic to do so.
264 If you are using Emacs, you might want to put something like this
267 (defun poor-mans-csharp-mode ()
269 (setq mode-name "C#")
270 (set-variable 'tab-width 8)
271 (set-variable 'indent-tabs-mode t)
272 (set-variable 'c-basic-offset 8)
273 (c-set-offset 'inline-open 0)
274 (c-set-offset 'case-label 0)
277 (setq auto-mode-alist (append '(("\\.cs\\'" . poor-mans-csharp-mode))