-
Notifications
You must be signed in to change notification settings - Fork 52
development setup
This page describes the minimal development setup to facilitate contributing to the project. This document assumes you are working on a Linux system, specific instructions might differ depending on your OS.
All source files are formatted according to the predefined clang-format
Google
style. In the CI this is enforced by checking the source files with clang-format
version 15 using the provided .clang-format
file.
It is advised to format your changes locally before pushing.
-
clang-format
version 15
# At project root
clang-format --style=file -i **/*.cpp **/*.h **/*.tpp
On vscode you can install the extension xaver.clang-format
. With the following settings, your IDE can then be configured to use clang-format
on saving a file:
"clang-format.executable": "clang-format"
"clang-format.assumeFilename": ".clang-format"
"editor.defaultFormatter": "xaver.clang-format"
"editor.formatOnSave": true
Codecov is used to track the coverage of the unit tests. The target coverage is set to 90% but going for full coverage is highly encouraged. When opening a PR, codecov-bot
will automatically comment the coverage report. Pushing to the feature branch will update the coverage comment.
It is possible to generate a coverage report locally. This requires lcov
to be installed and to have this CMake plugin present under cmake-modules
.
apt-get install lcov -y
# At project root
git clone https://github.com/bilke/cmake-modules.git
Now we can pass the ENABLE_COVERAGE=True
flag to CMake in order to generate the coverage target.
mkdir build && cd build
cmake .. -D-DENABLE_COVERAGE=True
# Generate the coverage report
make ctest_coverage
Welcome to the Graaf wiki!
In case anything is unclear, or you encounter any other problems, please reach out on Discord or open an issue.