-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
clang-tidy: Ignore the external directory #60640
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
@ptitjano did you test that clang-tidy was still able to spot issue in regular folders? |
b0db059
to
be8b79b
Compare
@troopa81 It looks like the clang-tidy CI does not work at the moment. One get the following error on each inspected file:
See for example:
This has nothing to do with the change introduced here. |
The external directory contains code for external librairies. It should not be inspected by clang-tidy. The regex syntax does not allow to directly ignore a directory. Solve this issue by adding a `clang-tidy` config file in the external directory which disables all the checks. See: https://stackoverflow.com/questions/74349432/clang-tidy-exclude-specific-dir-from-analysis See: https://stackoverflow.com/questions/58338202/cmake-clang-tidy-disable-checking-in-directory See: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/777/diffs
be8b79b
to
0acff83
Compare
This has been solved in #60659 This PR is ready now. |
Description
The external directory contains code for external librairies. It
should not be inspected by clang-tidy.
The regex syntax does not allow to directly ignore a directory. Solve
this issue by adding a
clang-tidy
config file in the externaldirectory which disables all the checks.
See:
https://stackoverflow.com/questions/74349432/clang-tidy-exclude-specific-dir-from-analysis
See:
https://stackoverflow.com/questions/58338202/cmake-clang-tidy-disable-checking-in-directory
See: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/777/diffs
cc @troopa81 @benoitdm-oslandia