-
Notifications
You must be signed in to change notification settings - Fork 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
Enabled clang-tidy checks in header files #2338
base: main
Are you sure you want to change the base?
Conversation
We could temporarily add another non blocking check that checks for warnings in the headers, and allow the current one to remain while we fix them. |
Also, 3p should ideally be in a separate folder anyways. |
b3db2ee
to
c12dde1
Compare
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.
For all cmake changes, I believe we need to use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR for cases where oneDNN is build as a cmake subproject.
b41a9f9
to
9f692ba
Compare
9f692ba
to
d14cbe6
Compare
d14cbe6
to
29a4258
Compare
Leading underscore was a legacy of ancient clang
Structure names in oneDNN public API do not include `_t` suffix and upset clang-tidy.
This preserves previous behavior in CI. New CHECK_ALL option enables clang-tidy in both headers and source.
29a4258
to
122c4d9
Compare
make test |
make test Lightweight_scans |
1 similar comment
make test Lightweight_scans |
Our current setup does not run any clang-tidy check on header files. One wrinkle is that we don't want it to touch any header files from third party components embedded in the source code, but current version of clang-tidy does not offer a way to exclude these. There are couple options:
ExcludeHeaderFilterRegex
option available in clang-tidy >=19.0/third-party
) (in this PR)With these changes CI will continue to scan source code only to avoid noise. Scan for headers will be available with
ONEDNN_USE_CLANG_TIDY=CHECK_ALL
option or manualclan-tidy
invocation. With that we have 1390 unique warnings for Intel CPU/GPU build.Related to MFDNN-12943.