-
Notifications
You must be signed in to change notification settings - Fork 511
[CI] upgrade to clang-tidy 20 #3762
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3762 +/- ##
=======================================
Coverage 89.95% 89.95%
=======================================
Files 225 225
Lines 7158 7158
=======================================
Hits 6438 6438
Misses 720 720 🚀 New features to boost your workflow:
|
…. Filter out generated third-party headers
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
| -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--quiet;-p;${BUILD_DIR}" | ||
| make -j $(nproc) | ||
| -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--header-filter=.*/opentelemetry-cpp/.*;--exclude-header-filter=.*(internal/absl|third_party|third-party)/.*;--quiet" |
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.
Is there a way to put this logic (header-filter) in the top level file .clang-tidy instead ?
It is desirable to have all the clang-tidy configuration in the same place, independent of the workflow & makefiles.
| -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \ | ||
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
| -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--quiet;-p;build-${{ matrix.cmake_options }}" | ||
| -DCMAKE_CXX_CLANG_TIDY="clang-tidy;--header-filter=.*/opentelemetry-cpp/.*;--exclude-header-filter=.*(internal/absl|third_party|third-party)/.*;--quiet" |
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.
Is there a way to put this logic (header-filter) in the top level file .clang-tidy instead ?
|
The generated reports (seen in CI) are very nice. |
Fixes #3538
To run clang-tidy on all header files we need to upgrade to version 20.1.0. This version adds the
--exclude-header-filterargument enabling analysis of all project header files excluding theapi/.../internal/abslheaders.Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes