Project

General

Profile

Contributing Code » History » Version 1

Alex Afanasyev, 11/25/2015 05:05 PM

1 1 Alex Afanasyev
Contributing Code
2
=================
3
4
NDN codebase is open-source and we welcome and encourage contributions from everybody.
5
In order to ensure design and code quality, we have established a process that includes code review and continuous integration checks on a number of supported platforms.
6
The following summarizes the process how to contribute to NDN projects (NFD, ndn-cxx, ndn-tools, NFD-android, NLSR, ndnSIM, ChronoSync, ChronoChat, ndn-group-encrypt):
7
8
- To inform NDN team about problems or to suggest new features, create issue in the corresponding project on [NDN redmine](http://redmine.named-data.net)
9
10
- All code submissions should go to [our code review system](http://gerrit.named-data.net)
11
12
### Code Review
13
14
The patches submitted for the code review are automatically checked for:
15
16
- successful compilation
17
- successful run of unit tests
18
- no errors produced while creating API (doxygen) documentation
19
20
  We will also accept issues and pull requests on GitHub.
21
  However, this may incur additional delay in merging the submitted code, as one of NDN developers will need to submit code to code review process on your behalf.
22
23
### Recommended Checks Before Patch Submission
24
25
In order to facilitate code review process, please perform the following tests before submitting patches for code review:
26
27
#### Check that code and all unit tests compile.  For most of our project, the following is the recommended way to configure and build project
28
29
    ./waf configure --debug --with-tests
30
    ./waf
31
32
#### Check that unit tests do not fail.  Refer to project's documentation on how to run unit tests.
33
34
NFD has 3 suites:
35
36
     ./build/unit-tests-core
37
     ./build/unit-tests-daemon
38
     ./build/unit-tests-rib
39
40
ndn-cxx and most other projects have one unit test suite:
41
42
     ./build/unit-tests
43
44
#### Check that there are no errors in API (doxygen) documentation
45
46
To check for API documentation, doxygen needs to be installed.  To build documentation, run
47
48
    ./waf doxygen
49
50
All warnings produced by this command must be fixed in order for the automatic continuous integration checks to succeed.