Skip to content
Michael Frey edited this page Jun 29, 2018 · 1 revision

tbd

Naming

Indentation and braces

Absolute values

Absolute values must be specified as macros or enums, not as literals, i.e. instead of

int timeout = 42 * 1000000;

write

int timeout = TIMEOUT_INTERVAL * USEC_PER_SEC;

Forward declarations

Avoid using forward declarations where possible. Just #include the headers you need. For further information on this rationale please check the Google Style Guide on C++.

Guards

All header files should have #define guards to prevent multiple inclusion. The format of the symbol name should be <PROJECT>_<MODULE>_<FILE>_H_., e.g. CCNL_CORE_FWD.H. For example, the file ccn-lite/src/ccnl-core/include/ccnl_fwd.h in our project should have the following guard:

#ifndef CCNL_CORE_FWD
#define CCNL_CORE_FWD
...
#endif

git

  • Make one commit per change.
  • The first line of the commit message describes the main feature of the commit.

Continuous integration

If the CI tests fail due to errors these errors need to be addressed.

Documentation