Project

General

Profile

Coding Standards » History » Version 7

Felix Schäfer, 2011-01-18 02:02

1 1 Eric Davis
h1. Coding Standards
2 7 Felix Schäfer
3
{{>toc}}
4 1 Eric Davis
5 5 Felix Schäfer
h2. Ruby and Rails Code
6 1 Eric Davis
7 5 Felix Schäfer
TODO: until then, follow the basic Ruby and Rails standards.
8 1 Eric Davis
9 5 Felix Schäfer
h2. Javascript
10 4 Ariel Skrodzki
11 5 Felix Schäfer
TODO
12 1 Eric Davis
13 5 Felix Schäfer
h2. CSS
14 1 Eric Davis
15 5 Felix Schäfer
TODO
16 1 Eric Davis
17 5 Felix Schäfer
h2. Documentation
18 1 Eric Davis
19 5 Felix Schäfer
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
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 1 Eric Davis
<pre>
30 5 Felix Schäfer
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>