Skip to content

Github clang tidy review

Ashar edited this page Jun 29, 2020 · 1 revision

Clang Tidy Review

In Push to the repository, the clang-tidy report will pass or fail and the actor who made the push can check the build logs to find and solve the clang-tidy warnings or issues. However, In the case of Pull Requests, it can be very difficult for the PR creator and the PR reviewer to constantly check clang-tidy reports from the build status.

Clang Tidy PR review

The solution for the PR problem in the above case is to make CI review a PR, we can easily do it in Github actions. Check the review made by bot in one of the Sample PR.

img

You can check the bot in action at this sample PR

The bot has been made in such a way that it does not Spam with the same reports when PR is Synced or Everything is okay. It does, however, comment more than once for a PR sync when a new file was added that has some issue.

Controlling the Checks

The clang-tidy checks that PR review and push request perform are controlled by .clang-tidy files at the root of the project. You can see what each check means at clang-tidy-10 docs