Commit 26e0c6bd authored by Jens Petit's avatar Jens Petit
Browse files

Added CONTRIBUTING readme file

parent fdea0ce2
Pipeline #171476 passed with stages
in 27 minutes and 23 seconds
# Contributing to elsa
This page summarizes advice how to contribute to elsa.
## General Workflow
#### a) Internal Developers
- Make a local clone of the elsa repository
- Checkout a new branch and work on your new feature or bugfix
- Push your branch and create a merge request targeting master
#### b) External Contributors
- Fork the elsa git repository
- Make a local clone your own fork
- Checkout a new branch and work on your new feature or bugfix
- Push your branch and send us a merge request targeting master
A branch should be short-lived and specific for a feature or bugfix. Commits should be squashed
into relevant groups before merging into master. Use
git rebase -i ${commit_to_rebase_on}
to clean up the commit history.
If during the development of a feature, `master` received updates, a `git rebase` should be preferred
over a `git merge` except when the changes are specifically needed in the feature branch:
git checkout feature-branch-name
git rebase master
Commit messages should follow some guidelines (derived from [this
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
## Testing
You can run the elsa unit tests by running `ctest` in the build folder. To specify which tests run,
filter with `ctest -R regular_expression`.
We use a testing style described as [Behaviour-Driven
Development]( (BDD). Please
follow this style when adding new tests.
## Style Guide
We use the tool `clang-format` to autoformat our code with the [given style
file](.clang-format). Please make sure that your code is formatted accordingly, otherwise the CI
will fail in the first stage. You can either execute
find elsa/ -name '*.h' -or -name '*.hpp' -or -name '*.cpp' | xargs clang-format -i -style=file $1
in the root folder, setup a git hook or integrate `clang-format` into your IDE.
## Linting
We use `clang-tidy` with the enabled checks specified in [the configuration file](.clang-tidy). Note
that currently all `readability-*` checks have to pass, otherwise the CI will fail. We encourage
developers to check their code with `clang-tidy` and remove all warnings if applicable.
## Code Coverage
We use `lcov` with `gcov` for test coverage information. If you want to run this locally you have to
do a debug build with coverage option enabled
mkdir -p build
cd build
make all -j4
make test_coverage
and then the results should be available at `build/test_coverage/index.html`. You can compare your
local results to [the latest master coverage results](
......@@ -53,6 +53,10 @@ When using the elsa library in your project, we advise using CMake as the build
As elsa depends on Eigen3 and spdlog, you will need to have these packages installed on your system, and you have to point CMake to those installations.
To get involved, please see our [contributing page.](
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment