Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Contributing

Anselmo L. S. Melo edited this page Oct 7, 2015 · 35 revisions

Before you contribute

We don't ask any kind of copyright assignment, you own the copyright of your changes. However we need to ensure you're the author of your changes and please do so by following http://developercertificate.org/

When submitting code to this project, please indicate that you certify you are able to contribute the code by adding a signed-off-by line at the end of your commit message (using your real name) such as:

Signed-off-by: Random J Developer <[email protected]>

Coding Style

We follow a style defined in 'uncrustify' schema. It's all specified in there, but the summary is similar to linux, but uses 4 spaces and no tabs. One can check the style using our tools/check-style.py. See GIT Hooks below.

License

Files should contain a license header and there specify who owns the copyright. Since Soletta is to be used in small operating systems and these often are compiled as a single statically linked binary we require the BSD-3 clause license.

Whenever adding new files, ensure the license is included at the top of the file. One can check the license using our tools/check-license.sh. See GIT Hooks below.

Exceptions are always painful to manage, but if there is an exception to your contribution please let us know and we can discuss about it. Eventually we can accept it in the main repository or create another repository with modules using different licenses, in this case we need to add entry-points so they are used (many are already supported, such as the flow and linux-micro modules).

Significant changes should also list their author in AUTHORS.

Test and Validate

Before sending patches please run our tests:

    make check
    make check-fbp
    make check-fbp-bin

If you did changes in C, please check your memory using Valgrind (to catch memory errors such as leaks and invalid access) and the overall coverage of your tests:

    make check-fbp-valgrind
    make coverage

GIT Hooks

We recommend contributors set a pre-commit GIT hook to check before sending patches:

#!/bin/sh
./tools/check-style.py || exit 1
./tools/check-license.sh || exit 1
exit 0

Save this as .git/hooks/pre-commit and remember to make it executable (chmod +x .git/hooks/pre-commit).

Notice that check-style.py requires uncrustify 0.60, check this page for more info on how to install this specific version.

Clone this wiki locally