Skip to content
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

Make clang-tidy happy #117

Open
zz-jason opened this issue Aug 20, 2024 · 0 comments
Open

Make clang-tidy happy #117

zz-jason opened this issue Aug 20, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@zz-jason
Copy link
Owner

zz-jason commented Aug 20, 2024

Background

Clang-Tidy is a clang-based C++ “linter” tool designed to help developers identify and fix common programming errors, such as style violations, interface misuse, and bugs that can be detected through static analysis12. It provides an extensible framework for diagnosing and correcting these issues, making it a valuable tool for maintaining code quality.

Currently, all the clang-tidy checks are confined in .clang-tidy file, there are still many check failures.

Make clang-tidy happy

Let's fix all these clang-tidy check violations and enable clang-tidy checks in CI. You can find these errors with the following steps:

# 0. install clang-tidy
sudo apt install -y clang-tidy

# 1. generate compile database (compile_commands.json)
cmake --preset=debug

# 2. run clang-tidy on certain files in the source/include directory, for example:
export FILES_TO_CHECK="include/leanstore/btree/*.hpp"
clang-tidy -p=build/debug --config-file=.clang-tidy -extra-arg='--std=c++2b' ${FILES_TO_CHECK}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant