-
Notifications
You must be signed in to change notification settings - Fork 422
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
[CI] Add a clang-tidy build #3001
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3001 +/- ##
==========================================
+ Coverage 87.12% 87.66% +0.55%
==========================================
Files 200 190 -10
Lines 6109 5858 -251
==========================================
- Hits 5322 5135 -187
+ Misses 787 723 -64 |
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.
Thanks for adding clang-tidy to the CI.
See some comments.
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.
This is taking shape.
Somehow the CI log do not show clang-tidy warnings, this needs some troubleshooting.
Make sure it works properly locally first, to validate CMAKE_CXX_CLANG_TIDY works.
A still have a problem. I'm not able to suppress the third_party. Please help me with this if you know anyway. Or could revert back to original approach without using the I have tried different combinations of regex but the clang-tidy is still not suppressing the warnings. Even, this is taking longer to run in CI |
See this code in the top level
The same way the prometheus-cpp sub directory is build with
Save and restore the setting, same as SAVED_ENABLE_TESTING. |
Thanks alot for the help. @marcalff
Thanks. |
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, thanks for the CI
The bazel-windows build, which take ~ 30mins, provide enough buffer for CI tasks that are slower but still relatively fast. It's also worth considering using Alpine Linux, as it includes the gRPC package, and the opentelemetry-demo is already utilizing it. |
Thanks @lalitb. I'll check this and include the OTLP_GRPC in the next clean up. |
Fixes #2051
Changes
clang-tidy-18
checks to GitHub Workflow..clang-tidy
file for checks which is added in [Code Health] clang-tidy cleanup, part 1 #2990WITH_OPENTRACING_SHIM
fails as it's taking the.clang-tidy
file and has the warningsAsErrors flag enabled) and the etw exporter [Move ETW exporter from opentelelemetry-cpp to opentelemetry-cpp-contrib #1423] are currently excluded from the build.clang-tidy-output.log
) and prints the number of warnings present.Problems
Currently installing gRPC is eating up a lot of time. Open for suggestions to optimize this.
Note
The build contains features which are in currently in preview. Should modify the workflow file when the feature is released as stable.
Remaining Work:
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes