Project

General

Profile

Coding Standards » History » Version 3

Eric Davis, 2010-10-22 19:06
Adding some standards, esp around tests

1 2 Eric Davis
{{toc}}
2
3 1 Eric Davis
h1. Coding Standards
4
5
h2. Ruby and Rails Code
6
7
TODO: until then, follow the basic Ruby and Rails standards.
8
9
h2. Javascript
10
11
TODO
12
13
h2. CSS
14
15
TODO
16
17 3 Eric Davis
h2. Documentation
18
19
Document you methods as needed and make sure any complex code is explained (e.g. regular expression parsing).  If it can't be understood 7 days later, it won't be understand next year and will need to be rewritten.
20
21
h2. Tests
22
23
Make sure any new code is tested, especially in the Controllers and Models.  Code without tests may (and probably will) be rejected on that reason alone.  Redmine is a very complex application with a lot of authentication and authorization code, so it's vital that changes are tested fully. Please don't take any offensive from this hard stance, protecting everyone's data and trust in the system is very important.
24
25 1 Eric Davis
h2. Commits
26
27
Commits should be formatted as below.  If you are contributed via git, this will save the committer a bunch of time:
28
29
<pre>
30
Short summary of your commit, 72 characters. #nnnn
31
32
(This is optional) Longer description of the change, including a 
33
list of what changed if it's a major change. Limit each line to 72
34
characters and use basic textile (* for lists). 
35
36
Contributed by Your Name
37
</pre>