[CI] update clang-tidy config#4066
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4066 +/- ##
==========================================
+ Coverage 82.09% 82.10% +0.02%
==========================================
Files 385 385
Lines 15989 15989
==========================================
+ Hits 13124 13126 +2
+ Misses 2865 2863 -2 🚀 New features to boost your workflow:
|
lalitb
approved these changes
May 8, 2026
malkia
added a commit
to malkia/opentelemetry-cpp
that referenced
this pull request
May 8, 2026
[CI] update clang-tidy config (open-telemetry#4066)
2 tasks
Open
3 tasks
thc1006
added a commit
to thc1006/opentelemetry-cpp
that referenced
this pull request
May 18, 2026
…ns in otlp_populate_attribute_utils After the clang-tidy v22 upgrade in open-telemetry#4066, four narrowing-conversion warnings resurfaced in otlp_populate_attribute_utils.cc. The four sites already had NOLINT suppressions for cppcoreguidelines-narrowing-conversions, but clang-tidy v22 reports the check under its bugprone-narrowing-conversions alias, so the suppressions no longer match. Update the four NOLINT comments to use the bugprone- name. No behavior change; this only adjusts a lint suppression. A fifth NOLINT at line 300 is left untouched because uint32_t to int64_t at that site is signed widening, not narrowing, and clang-tidy v22 correctly emits no warning there. Ratchet: * abiv1-preview warning_limit lowered from 418 to 414 * abiv2-preview warning_limit lowered from 424 to 420 Part of open-telemetry#2053 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
thc1006
added a commit
to thc1006/opentelemetry-cpp
that referenced
this pull request
May 18, 2026
…opulate_attribute_utils After the clang-tidy v22 upgrade in open-telemetry#4066, four narrowing-conversion warnings surfaced in otlp_populate_attribute_utils.cc at the four uint64_t to int64_t call sites passing to proto set_int_value. The original code suppressed via NOLINT(cppcoreguidelines-narrowing-conversions). In clang-tidy v22 both bugprone-narrowing-conversions and cppcoreguidelines-narrowing-conversions are registered as separate aliases, and NOLINT for one alias does not suppress the report under the other. So an alias-name-rename approach cannot silence the warnings with a single NOLINT. Replace the four NOLINT-suppressed implicit narrowings with explicit static_cast<int64_t> conversions, matching the pattern established in open-telemetry#3989, open-telemetry#3997, and open-telemetry#4013. This removes the alias dependency entirely and makes the narrowing explicit at the call site. The fifth NOLINT at line ~297 (uint32_t to int64_t) is signed widening, not narrowing; clang-tidy v22 emits no diagnostic there. Left untouched. Ratchet: * abiv1-preview warning_limit lowered from 418 to 414 * abiv2-preview warning_limit lowered from 424 to 420 Part of open-telemetry#2053 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
thc1006
added a commit
to thc1006/opentelemetry-cpp
that referenced
this pull request
May 18, 2026
…opulate_attribute_utils After the clang-tidy v22 upgrade in open-telemetry#4066, four narrowing-conversion warnings surfaced in otlp_populate_attribute_utils.cc at the four uint64_t to int64_t call sites passing to proto set_int_value. The original code suppressed via NOLINT(cppcoreguidelines-narrowing-conversions). In clang-tidy v22 both bugprone-narrowing-conversions and cppcoreguidelines-narrowing-conversions are registered as separate aliases, and NOLINT for one alias does not suppress the report under the other. So an alias-name-rename approach cannot silence the warnings with a single NOLINT. Replace the four NOLINT-suppressed implicit narrowings with explicit static_cast<int64_t> conversions, matching the pattern established in open-telemetry#3989, open-telemetry#3997, and open-telemetry#4013. This removes the alias dependency entirely and makes the narrowing explicit at the call site. The fifth NOLINT at line ~297 (uint32_t to int64_t) is signed widening, not narrowing; clang-tidy v22 emits no diagnostic there. Left untouched. Ratchet: * abiv1-preview warning_limit lowered from 418 to 414 * abiv2-preview warning_limit lowered from 424 to 420 Part of open-telemetry#2053 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
thc1006
added a commit
to thc1006/opentelemetry-cpp
that referenced
this pull request
May 19, 2026
…opulate_attribute_utils After the clang-tidy v22 upgrade in open-telemetry#4066, four narrowing-conversion warnings surfaced in otlp_populate_attribute_utils.cc at the four uint64_t to int64_t call sites passing to proto set_int_value. The original code suppressed via NOLINT(cppcoreguidelines-narrowing-conversions). In clang-tidy v22 both bugprone-narrowing-conversions and cppcoreguidelines-narrowing-conversions are registered as separate aliases, and NOLINT for one alias does not suppress the report under the other. So an alias-name-rename approach cannot silence the warnings with a single NOLINT. Replace the four NOLINT-suppressed implicit narrowings with explicit static_cast<int64_t> conversions, matching the pattern established in and makes the narrowing explicit at the call site. The fifth NOLINT at line ~297 (uint32_t to int64_t) is signed widening, not narrowing; clang-tidy v22 emits no diagnostic there. Left untouched. Ratchet: * abiv1-preview warning_limit lowered from 418 to 414 * abiv2-preview warning_limit lowered from 424 to 420 Part of open-telemetry#2053 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI is failing due to clang-tidy warning limits
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes