Skip to content

[CodeHealth] Fix clang tidy warnings part 4 #3501

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

Merged
merged 15 commits into from
Jun 30, 2025

Conversation

dbarker
Copy link
Member

@dbarker dbarker commented Jun 28, 2025

Contributes to #2053

Changes

Address clang-tidy warning categories

  • google-runtime-int (nolint used for curl operations with long)
  • google-readability-casting
  • cppcoreguidelines-macro-to-enum
  • cppcoreguidelines-prefer-member-initializer
  • performance-unnecessary-copy-initialization

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

Copy link

netlify bot commented Jun 28, 2025

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit 119a867
🔍 Latest deploy log https://app.netlify.com/projects/opentelemetry-cpp-api-docs/deploys/6862f2b18a447b00080b7819

@dbarker dbarker changed the title Fix clang tidy warnings part 4 [CodeHealth] Fix clang tidy warnings part 4 Jun 28, 2025
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.95%. Comparing base (22715dd) to head (119a867).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3501      +/-   ##
==========================================
- Coverage   89.96%   89.95%   -0.01%     
==========================================
  Files         219      219              
  Lines        7051     7051              
==========================================
- Hits         6343     6342       -1     
- Misses        708      709       +1     
Files with missing lines Coverage Δ
...nclude/opentelemetry/sdk/metrics/data/point_data.h 96.30% <ø> (ø)
...egation/base2_exponential_histogram_aggregation.cc 90.91% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbarker dbarker marked this pull request as ready for review June 28, 2025 22:02
@dbarker dbarker requested a review from a team as a code owner June 28, 2025 22:02
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This:

// NOLINTNEXTLINE(google-runtime-int)

is indeed the best fix for curl.

Changing the code to please the google style breaks curl on 32bits machines.

@marcalff marcalff merged commit dff39f3 into open-telemetry:main Jun 30, 2025
70 checks passed
@dbarker dbarker deleted the fix_clang_tidy_warnings_part_4 branch July 10, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants