-
Notifications
You must be signed in to change notification settings - Fork 18
/
STYLE
73 lines (53 loc) · 2.33 KB
/
STYLE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Coding Style
------------
1. indent by either two or four spaces, or use tabs, but be
consistent within a file, preferred is four spaces, no tabs, for
example:
static int foo(int a)
{
if (a) {
func(abc, xyz);
def;
} else {
ghi;
jkl;
}
}
2. for minor changes, do not change indentation, keep it consistent
with the indentation in the file you are working on,
3. for major changes to a file, indent the file entirely.
Darcs - Sending Patches
-----------------------
1. if code is your own work, distribute it as a darcs patch, either
using "darcs send", "darcs send --output=somefile.dpatch" or by
publishing it on a repository accessible via HTTP.
2. if you are unable to use darcs, and want your code to appear
in the upstream darcs repositories, send a unified diff privately to
another person who can use darcs. Don't send it to the list. That
person can create the patch (using --author "[email protected]")
in your name, and publish it as a dpatch.
3. if you receive code via the mailing list that is in a non-darcs
format, please branch your repository to test the patch. If you feel
the need to use "darcs record" please do not publish the dpatch. Wait
until a dpatch is sent to the list before applying it to your main
working repository.
The intention of these patch sending guidelines is to reduce the
effort required by developers in resolving conflicts.
Darcs - Patch Name and Long Comment
-----------------------------------
1. the patch name should be the text that would normally be entered
into the NEWS file of the project. It is a user-visible description
of the change, less than about 60 characters, in plain english.
http://www.gnu.org/prep/standards/html_node/NEWS-File.html
2. the long comment should be the text that would normally be entered
into the ChangeLog file of the project, minus the date, who made the
change, and their e-mail address. It is the body of the ChangeLog
entry.
http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html
Darcs - Signed-off-by
---------------------
Peer review is where another developer reviews a patch and agrees to
inclusion. Some developers may be responsible for certain components.
Their sign-off may be helpful. To sign off on a patch, reply to it
and add a line:
Signed-off-by: Your Name <[email protected]>