Add clang-tidy-diff to CI
clang-tidy comes with a tool for running it on a diff
https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
This could be included in the CI to automate the step of checking for clang tidy warnings in new code. Of course this needs a compilation database to be generated by CMake, i.e. the configuration needs to be run. But that should be no problem.
The question would be
- what checks to enable and
- whether warnings are blocking a MR or not.
Command? git diff -U0 master...HEAD | clang-tidy-diff.py -p1
Edited by d.kilic