/ CONTRIBUTING
CONTRIBUTING
 1  
 2  
 3                                CONTRIBUTING
 4  
 5  
 6  When contributing code, please follow these simple guidelines.
 7  
 8  Code
 9  ----
10  Make sure you run `rustfmt` on your code. Also ensure all trailing whitespace
11  is trimmed.
12  
13  Git commits
14  -----------
15  A properly formed git commit subject line should always be able to complete the
16  following sentence:
17  
18       If applied, this commit will _____
19  
20  For example, the following message is well formed:
21  
22       Add support for .gif files
23  
24  In addition, it should be capitalized and *must not* include a period.
25  
26  When it comes to formatting, here's a model git commit message[1]:
27  
28       Capitalized, short (50 chars or less) summary
29  
30       More detailed explanatory text, if necessary.  Wrap it to about 72
31       characters or so.  In some contexts, the first line is treated as the
32       subject of an email and the rest of the text as the body.  The blank
33       line separating the summary from the body is critical (unless you omit
34       the body entirely); tools like rebase can get confused if you run the
35       two together.
36  
37       Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
38       or "Fixes bug."  This convention matches up with commit messages generated
39       by commands like git merge and git revert.
40  
41       Further paragraphs come after blank lines.
42  
43       - Bullet points are okay, too.
44  
45       - Typically a hyphen or asterisk is used for the bullet, followed by a
46         single space, with blank lines in between, but conventions vary here.
47  
48       - Use a hanging indent.
49  
50  ---
51  
52  [1]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html