4 These are guidelines for new code. Some of existing hasn't been updated to
7 Whitespace (all languages):
9 * indentation is 4 spaces
11 * never use tabs as indents
13 * otherwise tab equals to 8 spaces
15 * separate classes with two empty lines
19 * camelCase for functions/methods
21 * UpperCase for structures/classes
23 * lowercase for namespaces/modules
25 * `UPPER_CASE` for #defines
27 * single underscore prefix for variables/functions in automatically generated
32 * enclose single statement `if` clauses in { }, specially for automatically
37 * use inlines for functions/methods which are called with high-frequency
41 * `lower_case` commands
43 * space between ( and precedent name
46 When in doubt, be consistent with the existing code.
54 * Existing features in master branch should not degrade at any time, for any
55 platform. (Unless it is not widely used and there is agreement.)
57 * It's fine to add new features for only some platforms.
59 * Non-trivial changes should be staged in a branch, to enable peer-review and
60 regression testing. Branch should be deleted once code has been merged.
62 * Releases are tagged commits from master. There are no stable branches.
65 Backwards compatibility:
67 * Backwards binary compatibility with old traces must be always maintained: all
68 tools, including glretrace, must handle old traces without regressions.
70 * No backwards compatibility guarantees for derived data (ASCII dumps, state,
73 * There should be no gratuitous change to command line tool interfaces, but no
81 There is a regression test suite under development in
82 https://github.com/apitrace/apitrace-tests .