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

Use clang-tidy #2357

Closed
lbartoletti opened this issue Aug 8, 2022 · 1 comment
Closed

Use clang-tidy #2357

lbartoletti opened this issue Aug 8, 2022 · 1 comment

Comments

@lbartoletti
Copy link
Contributor

clang-tidy is a useful tool for helping to keep a good code quality. I would suggest looking into the following option classes:

bugprone-
clang-analyzer-
cppcoreguidelines-
modernize-
openmp-
performance-
portability-
readability-

It can give warnings, but with -fix or --fix-errors it can even automatically apply some corrections.

The full list of options is here.

Notably, it also integrates well with IDEs (see here.

From a terminal,

use -DCMAKE_EXPORT_COMPILE_COMMANDS=ON when calling cmake (e.g. add it to the cmake.sh)
use -p=build when calling clang-tidy, so it will know all include directories, defines etc.

Problem
No problems, but

Improvement
There are warnings and improvements (readability, performance, etc)

Alternatives

@lbartoletti
Copy link
Contributor Author

[X] Performance: #2356

@cvvergara cvvergara added this to the Release 3.3.2 milestone Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants