🎉Thanks for taking the time to contribute!🎉
The following is a set of guidelines for contributing to hiredis-cluster.
The basics about setting up the project, building and testing is covered in the README.
Adhere to the existing coding style and make sure to mimic best possible.
To have a common look-and-feel clang-format is used for code formatting. The formatting rules can be applied to the source code by running the following make target in your build directory:
$ make format
Make sure changes are covered by tests. Code coverage instrumentation can be enabled using a build option and a detailed html report can be viewed using following example:
$ mkdir -p build; cd build
$ cmake -DENABLE_COVERAGE=ON ..
$ make all test coverage
$ xdg-open ./coverage.html
The report generation requires that gcovr is installed in your path. Any reporting tool of choice can be used, as long as it reads .gcda and .gcno files created during the test run.
- Run the formatter before committing when contributing to this project (
make format
). - Cover new behaviour with tests when possible.
- clang-format for code formatting