Skip to content

PS-9760 Adds clang-tidy checks to CircleCI #5627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

VarunNagaraju
Copy link
Contributor

https://perconadev.atlassian.net/browse/PS-9760

Along with clang-format checks, CircleCI is now equipped with clang-tidy checks as well, which perform static code analysis on the files modified by a particular PR.

Similar to clang-format checks, the console log of the CircleCI contains the output from the clang-tidy checks, which has 2 parts:

  1. The clang-tidy warnings, considering the corresponding C++ standard, C++ standard library, and respective header files using the generated compile_commands.json file.
  2. The clang-tidy suggestions, using same information from above, applied as a diff on the modified files. This helps visualise the recommended changes to improve the code.

@VarunNagaraju
Copy link
Contributor Author

An example run with debug info can be seen here https://circleci.com/gh/percona/percona-server/8821

Copy link
Collaborator

@inikep inikep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor comment regarding -extra-arg=-stdlib=libc++

Copy link
Collaborator

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

https://perconadev.atlassian.net/browse/PS-9760

Along with clang-format checks, CircleCI is now equipped with clang-tidy
checks as well, which perform static code analysis on the files modified
by a particular PR.

Similar to clang-format checks, the console log of the CircleCI contains
the output from the clang-tidy checks, which has 2 parts:
1. The clang-tidy warnings, considering the corresponding C++ standard,
   C++ standard library, and respective header files using the generated
   compile_commands.json file.
2. The clang-tidy suggestions, using same information from above, applied
   as a diff on the modified files. This helps visualise the recommended
   changes to improve the code.
@VarunNagaraju VarunNagaraju merged commit cc63c04 into percona:8.0 Jun 26, 2025
6 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants