summaryrefslogtreecommitdiff
path: root/DEVELOPMENT.markdown
blob: 5af6ed697e3962328fa280d68572fdb392141475 (plain)
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
74
75
76
77
78
79
80
81
82
83
Coding Style
============

These are guidelines for new code.  Some of existing hasn't been updated to
these conventions yet.

Whitespace (all languages):

 * indentation is 4 spaces

 * never use tabs as indents

 * otherwise tab equals to 8 spaces

 * separate classes with two empty lines

Naming convention:

 * camelCase for functions/methods

 * UpperCase for structures/classes

 * lowercase for namespaces/modules

 * `UPPER_CASE` for #defines

 * single underscore prefix for variables/functions in automatically generated
   code

C++:

 * enclose single statement `if` clauses in { }, specially for automatically
   generated code

 * } else {

 * use inlines for functions/methods which are called with high-frequency

CMake:

 * `lower_case` commands

 * space between ( and precedent name


When in doubt, be consistent with the existing code.


Commit policy
=============

Feature development:

* Existing features in master branch should not degrade at any time, for any
  platform.  (Unless it is not widely used and there is agreement.)

* It's fine to add new features for only some platforms.

* Non-trivial changes should be staged in a branch, to enable peer-review and
  regression testing.  Branch should be deleted once code has been merged.

* Releases are tagged commits from master.  There are no stable branches.


Backwards compatibility:

* Backwards binary compatibility with old traces must be always maintained: all
  tools, including glretrace, must handle old traces without regressions.

* No backwards compatibility guarantees for derived data (ASCII dumps, state,
  images, etc).

* There should be no gratuitous change to command line tool interfaces, but no
  guarantees are given.



Regression testing
==================

There is a regression test suite under development in
https://github.com/apitrace/apitrace-tests .