[CODE HEALTH] Move otlp, zipkin and prometheus test classes into anonymous namespace#4231
Merged
marcalff merged 3 commits intoJul 10, 2026
Conversation
…ymous namespace Give the remaining flagged test fixtures and helper classes in the otlp, zipkin and prometheus exporter tests internal linkage by moving them into anonymous namespaces, clearing the last misc-use-internal-linkage warnings in those files. The friend-declared exporter TestPeer classes are left in place since moving them would break the friendship. Lower the clang-tidy warning_limit by 19 accordingly. Part of open-telemetry#4196. Signed-off-by: Mateen Anjum <mateenali66@gmail.com>
479d305 to
e79c5cd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4231 +/- ##
=======================================
Coverage 82.80% 82.80%
=======================================
Files 415 415
Lines 17452 17452
=======================================
Hits 14449 14449
Misses 3003 3003 🚀 New features to boost your workflow:
|
marcalff
approved these changes
Jul 9, 2026
marcalff
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks for the cleanup.
dbarker
approved these changes
Jul 9, 2026
dbarker
left a comment
Member
There was a problem hiding this comment.
Thanks! Please see minor comments below on the warning counts.
Set warning_limit to the clang-tidy-reported counts (137 abiv1, 145 abiv2) per @dbarker's review, instead of the conservative decrement. Signed-off-by: Mateen Anjum <mateenali66@gmail.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.
Finishes the misc-use-internal-linkage cleanup from #4196, covering the otlp, zipkin and prometheus exporter test files thc1006 handed off after #4225.
Moves the flagged test fixtures and helper classes into anonymous namespaces to give them internal linkage. The friend-declared exporter TestPeer classes are not flagged and are left in place, since moving them would break the friend relationship with the production exporters.
Verified on an Ubuntu 24.04 + clang-tidy-22 build (the same preset the CI job uses): all 19 misc-use-internal-linkage warnings in these files are cleared, the affected test targets compile and link, and clang-format is clean. Lowered the warning_limit by 19 for both ABI presets.
Part of #4196.