Skip to content

[CODE HEALTH] Move otlp, zipkin and prometheus test classes into anonymous namespace#4231

Merged
marcalff merged 3 commits into
open-telemetry:mainfrom
mateenali66:code-health/4196-otlp-zipkin-prometheus-anon-namespace
Jul 10, 2026
Merged

[CODE HEALTH] Move otlp, zipkin and prometheus test classes into anonymous namespace#4231
marcalff merged 3 commits into
open-telemetry:mainfrom
mateenali66:code-health/4196-otlp-zipkin-prometheus-anon-namespace

Conversation

@mateenali66

Copy link
Copy Markdown
Contributor

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.

@mateenali66 mateenali66 requested a review from a team as a code owner July 9, 2026 16:07
…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>
@mateenali66 mateenali66 force-pushed the code-health/4196-otlp-zipkin-prometheus-anon-namespace branch from 479d305 to e79c5cd Compare July 9, 2026 16:07
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.80%. Comparing base (c0dc559) to head (199d4b0).

Additional details and impacted files

Impacted file tree graph

@@           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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks for the cleanup.

@dbarker dbarker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Please see minor comments below on the warning counts.

Comment thread .github/workflows/clang-tidy.yaml Outdated
Comment thread .github/workflows/clang-tidy.yaml Outdated
marcalff and others added 2 commits July 9, 2026 23:39
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>
@marcalff marcalff merged commit 7caa63c into open-telemetry:main Jul 10, 2026
72 checks passed
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.

3 participants