It would be great to have some code analyzes, good news, there are a lot of tools to do so!
This MR add ci support for.
-
iwyu: do not work well with QT see here, here as QT required some mapping to there include indirection design. -
cppcheck: currently check warning,performance,portability -
clang-tidy: currently check default warning
This result in the following pipeline:
TODO:
-
Fix cppcheck errors -
Check which check should be enable clang-tidy and fix the error.
CMake has included support for them
So why didn't we used it?
This can be interesting for developer, but not for the CI. In the CI, for performances, we use the same build directory, to do incremental builds. This may lead to some error, imagine the following example:
- Create a feature
- Open MR
- Pipeline is launch and clang format report a warning
- The developer update some readme.md
- Pipeline is launch and succeed despite the fact the clang-tidy warning is not fixes.