Ticket #13004: onionoo-contributor-guide.md

File onionoo-contributor-guide.md, 1.6 KB (added by karsten, 5 years ago)

Onionoo contributor guide, first draft, from #12882

Line 
1# Contributor Guide
2
3This guide is meant for people who want to contribute patches to Onionoo.
4
5## Patch format
6
7Format your patches using `git format-patch` if you want to submit just a single, small commit.
8If you want to submit more than one commit, push your changes to a public Git repository somewhere that can be pulled from.
9
10## Whitespace conventions
11
12Whitespace conventions are important, because whitespace changes bloat patches and make them harder to review.
13If we all agree on the same whitespace conventions, the only changes to review are actually meaningful changes.
14If you need to make whitespace changes, because files did not conform to whitespace conventions before, do these changes in one or more separate commits that contain nothing else than whitespace changes.
15
16The following whitespace conventions apply:
17
18 - Maximum line width is 74 characters.  Why 74?  Because it looks pretty in vim in a 80-character terminal with line numbers turned on.
19 - Full sentences are followed by a period and two spaces.  An exception to this rule are sentences in markup files like Markdown; in this case, each sentence should start with a newline, so that a change in one sentence doesn't cause changes to all subsequent sentences.  An exception to this exception are multiple sentences in a single bullet point.
20 - Indentations use two spaces, no tabs.  Continuations use four spaces.
21 - Attributes and methods are typically separated by two newlines.  An exception are attributes with getters and setters which can be written without separating newlines.
22 - All source files end with two newlines.