Thank you for your interest in contributing to open62541++! There are many ways to contribute, and all of them are appreciated.
- Fork the open62541pp repository on GitHub
- Clone your fork of open62541pp
git clone --recursive https://github.com/<your-username>/open62541pp.git
- Create a new branch for the feature or fix
- Commit to the new branch
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
- Commit messages must follow the conventional commits specification so that changelogs can be automatically generated.
- Create a pull request (PR) on GitHub
- If adding a new feature:
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
- If fixing a bug:
- Provide a detailed description of the bug in the PR.
- If adding a new feature:
# create build directory
mkdir build
cd build
# configure with recommended project options for development (sanitizers require GCC or Clang)
cmake -DCMAKE_BUILD_TYPE=Debug \
-DUAPP_BUILD_DOCUMENTATION=ON \
-DUAPP_BUILD_EXAMPLES=ON \
-DUAPP_BUILD_TESTS=ON \
-DUAPP_ENABLE_CLANG_TIDY=ON \
-DUAPP_ENABLE_SANITIZER_ADDRESS=ON \
-DUAPP_ENABLE_SANITIZER_LEAK=ON \
-DUAPP_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON \
..
# or use ccmake/cmake-gui to toggle the project options
# build
cmake --build .
# run tests
ctest --output-on-failure
Defined checks can be automatically executed before committing with pre-commit:
# install pre-commit
pip install pre-commit
# install git hook scripts defined in `.pre-commit-config.yaml`
pre-commit install
# (optionally) run against all the files
pre-commit run --all-files
Please use both and clang-tidy
and clang-format
during development.
The provided configs .clang-tidy
and .clang-format
will enforce modern C++, best practises and uniform formatting.