aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-03-03 18:37:47 +0100
committerPacien TRAN-GIRARD2016-03-03 18:37:47 +0100
commit3ab896dcbc80d1de49a625571ed0a63946fa0008 (patch)
tree7b9131461b0ab8f34452964c15979a3554e8e204
parent264fec2ec938a6c525ca6f569692118a8216ca19 (diff)
downloadxblast-3ab896dcbc80d1de49a625571ed0a63946fa0008.tar.gz
Adding convention reference
-rw-r--r--conventions.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/conventions.md b/conventions.md
new file mode 100644
index 0000000..875292f
--- /dev/null
+++ b/conventions.md
@@ -0,0 +1,41 @@
1Coding conventions
2==================
3
4This document contains some syntactic and code format conventions for the current project and should be used as a
5reference to enhance code uniformity.
6
7
8Formatting
9----------
10
11Sources are formatted as defined in the `EPFL-PPO.xml` Eclipse format file.
12
13
14Members ordering
15----------------
16
17Class (static) members are placed before object members. In each group, attributes are placed before methods.
18Constructors are the first methods, and overridden parent methods the last ones.
19
20
21Object/Class reference
22----------------------
23
24Methods and attributes are referenced using `this` for the current class, and by their class name for static
25ones.
26
27Static imports are avoided, except for JUnit tests.
28
29
30Redundant type/scope
31--------------------
32
33Use of the diamond notation is encouraged to avoid redundancy.
34
35Unnecessary scope modifiers are avoided (ex: `public` in interfaces).
36
37
38Unnecessary brackets
39--------------------
40
41Unnecessary brackets in one to two line statements are avoided to simplify the reading of the control flow.