Kagome
Polkadot Runtime Engine in C++17
|
In Kagome we use certain set of tools to assure code quality. Here is a list, and guide how to use them.
Set of rules is specified at root .clang-tidy
file.
mkdir build
cd build
cmake .. -DCLANG_TIDY=ON
make
Warnings/errors will be reported to stderr, same as compiler warnings/errors.
clang-tidy
is in PATHclang-tidy-diff.py
is in PATH./usr/local/Cellar/llvm/8.0.0_1/share/clang/clang-tidy-diff.py
(note, 8.0.0_1 is your version, it may be different)./usr/lib/llvm-8/share/clang/clang-tidy-diff.py
mkdir build
cd build
cmake ..
make generated
- this step creates generated headers (protobuf, etc)cd ..
housekeeping/clang-tidy-diff.sh
When CMAKE_TOOLCHAIN_FILE is specified, then specific toolchain is used. Toolchain is a cmake file, which sets specific variables, such as compiler, its flags, build mode, language standard.
Example:
All dependencies will be built with gcc-8 and cxx17 standard.
Default toolchain is cxx17.cmake
. List of toolchains.
Also, sanitizers can be enabled with use of toolchains, so all dependencies will be built with specified sanitizer.
Coverage is calculated automatically by Jenkins (CI).
We use codecov to display coverage.