Contributing Code » History » Version 5
Davide Pesavento, 01/03/2023 02:18 AM
| 1 | 5 | Davide Pesavento | # Contributing Code |
|---|---|---|---|
| 2 | 1 | Alex Afanasyev | |
| 3 | NDN codebase is open-source and we welcome and encourage contributions from everybody. |
||
| 4 | 5 | Davide Pesavento | 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. The following summarizes the process to contribute to NDN projects (NFD, ndn-cxx, ndn-tools, NFD-android, NLSR, ndnSIM, PSync, repo-ng, and many others). |
| 5 | 1 | Alex Afanasyev | |
| 6 | 4 | Davide Pesavento | - To inform NDN team about problems or to suggest new features, create an issue in the corresponding project on [NDN redmine](https://redmine.named-data.net) |
| 7 | 1 | Alex Afanasyev | - All code submissions should go to our [code review system](https://gerrit.named-data.net) |
| 8 | |||
| 9 | 5 | Davide Pesavento | See also our [contributing guide](https://github.com/named-data/.github/blob/master/CONTRIBUTING.md) for additional information. |
| 10 | 4 | Davide Pesavento | |
| 11 | 5 | Davide Pesavento | ## Code Review |
| 12 | 1 | Alex Afanasyev | |
| 13 | The patches submitted for the code review are automatically checked for: |
||
| 14 | |||
| 15 | - successful compilation |
||
| 16 | - successful run of unit tests |
||
| 17 | - no errors produced while creating API (doxygen) documentation |
||
| 18 | |||
| 19 | ### Recommended Checks Before Patch Submission |
||
| 20 | |||
| 21 | In order to facilitate code review process, please perform the following tests before submitting patches for code review: |
||
| 22 | |||
| 23 | #### Check that code and all unit tests compile. For most of our project, the following is the recommended way to configure and build project |
||
| 24 | |||
| 25 | ./waf configure --debug --with-tests |
||
| 26 | ./waf |
||
| 27 | |||
| 28 | #### Check that unit tests do not fail. Refer to project's documentation on how to run unit tests. |
||
| 29 | |||
| 30 | 3 | Davide Pesavento | NFD has 4 test suites: |
| 31 | 1 | Alex Afanasyev | |
| 32 | ./build/unit-tests-core |
||
| 33 | ./build/unit-tests-daemon |
||
| 34 | ./build/unit-tests-rib |
||
| 35 | 3 | Davide Pesavento | ./build/unit-tests-tools |
| 36 | 1 | Alex Afanasyev | |
| 37 | 3 | Davide Pesavento | ndn-cxx and most other projects have one test suite: |
| 38 | 1 | Alex Afanasyev | |
| 39 | ./build/unit-tests |
||
| 40 | |||
| 41 | #### Check that there are no errors in API (doxygen) documentation |
||
| 42 | |||
| 43 | To check for API documentation, doxygen needs to be installed. To build documentation, run |
||
| 44 | |||
| 45 | ./waf doxygen |
||
| 46 | |||
| 47 | All warnings produced by this command must be fixed in order for the automatic continuous integration checks to succeed. |
||
| 48 | 2 | Alex Afanasyev | |
| 49 | 5 | Davide Pesavento | Note that `./waf doxygen` will not rebuild documentation if there were no changes in source files. To rebuild documentation without changing source files, run `./waf clean` before running `./waf doxygen` |