aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothée Floure2016-03-03 22:02:39 +0100
committerTimothée Floure2016-03-03 22:02:39 +0100
commit249778111cc6ac1f8d16b1c7141a037008dc728f (patch)
tree7b9131461b0ab8f34452964c15979a3554e8e204
parent264fec2ec938a6c525ca6f569692118a8216ca19 (diff)
parent3ab896dcbc80d1de49a625571ed0a63946fa0008 (diff)
downloadxblast-249778111cc6ac1f8d16b1c7141a037008dc728f.tar.gz
Merge branch 'conventions' into 'master'
Coding conventions If agreed, merge into master. See merge request !2
-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.