aij
aij

Reputation: 6491

Generate Code Climate reports from CMake / clang warnings

We have a large CMake-based C++ project in Gitlab, using Gitlab CI, and it would be really nice to be able to see compiler warnings/errors in the Gitlab UI. To get that to work, it seems Gitlab requires the report to be generated in the codeclimate format.

It seems like it would be fairly straightforward to generate a code climate report from the build logs, but that also seems rather fragile as the output could vary across compilers / compiler versions. It also seems like the sort of integration that someone would have already done and integrated into CMake.

Is there a good way to generate CodeClimate reports from CMake? Ideally I would like it to include clang, gcc, and clang-tidy output.

Upvotes: 3

Views: 1175

Answers (1)

5634
5634

Reputation: 105

Check out CodeChecker. It supports analyzing with clang-tidy and parsing the results into a CodeClimate report which is described here: https://codechecker.readthedocs.io/en/latest/gitlab_integration/#using-codechecker-parse

Upvotes: 3

Related Questions