Contributing Code quality

Code quality and continuous integration

Using the manage tool

Before making a pull request with changes to this library, please ensure that style checks passes, that the code compiles, unit test passes and that there are no errors found by the static analyser.

For code formatting and linting, we use Trunk to manage this process. To install trunk run

curl -fsSL | bash

In order for clang-tidy to work, you need to generate a compile_commands.json. To do this, run the first part of the CMake build process:

mkdir Debug
cd Debug
cmake ..

and then copy compile_commands.json into the root directory:

cp compile_commands.json ../

To check the style, run

trunk check

To automatically format the code use

trunk fmt

Running tests

In order to run the tests, you first need to build the library. Assuming that this is already done and the corresponding build is in Debug/:

cmake ..

and then running following command: