Skip to content

[repo] Enable analysis globally #6344

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 28 commits into from
Jun 26, 2025
Merged

Conversation

Kielek
Copy link
Contributor

@Kielek Kielek commented Jun 23, 2025

Fixes #3958

Changes

Last commit related to enforcing analysis level across all projects.
Includes changes for samples, I missed it previosly.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • [ ] Unit tests added/updated
  • [ ] Appropriate CHANGELOG.md files updated for non-trivial changes
  • [ ] Changes in public API reviewed (if applicable)

@Kielek Kielek requested a review from a team as a code owner June 23, 2025 06:51
@github-actions github-actions bot added documentation Documentation related infra Infra work - CI/CD, code coverage, linters pkg:OpenTelemetry.Api.ProviderBuilderExtensions Issues related to OpenTelemetry.Api.ProviderBuilderExtensions NuGet package pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package pkg:OpenTelemetry.Exporter.Console Issues related to OpenTelemetry.Exporter.Console NuGet package pkg:OpenTelemetry.Exporter.InMemory Issues related to OpenTelemetry.Exporter.InMemory NuGet package pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package pkg:OpenTelemetry.Exporter.Zipkin Issues related to OpenTelemetry.Exporter.Zipkin NuGet package pkg:OpenTelemetry.Extensions.Hosting Issues related to OpenTelemetry.Extensions.Hosting NuGet package pkg:OpenTelemetry.Extensions.Propagators Issues related to OpenTelemetry.Extensions.Propagators NuGet package pkg:OpenTelemetry.Shims.OpenTracing Issues related to OpenTelemetry.Shims.OpenTracing NuGet package pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package perf Performance related labels Jun 23, 2025
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.68%. Comparing base (5f9b011) to head (37ceab3).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6344      +/-   ##
==========================================
- Coverage   86.69%   86.68%   -0.02%     
==========================================
  Files         258      258              
  Lines       11879    11879              
==========================================
- Hits        10299    10297       -2     
- Misses       1580     1582       +2     
Flag Coverage Δ
unittests-Project-Experimental 86.67% <ø> (+0.05%) ⬆️
unittests-Project-Stable 86.66% <ø> (+0.08%) ⬆️
unittests-Solution 86.62% <ø> (+0.21%) ⬆️
unittests-UnstableCoreLibraries-Experimental 85.68% <ø> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

@@ -37,7 +37,9 @@ public static IServiceCollection AddDedicatedLogging(
return services;
}

#pragma warning disable CA1812 // Avoid uninstantiated internal classes

Choose a reason for hiding this comment

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

nit: in a follow up PR; consider disabling these warnings for the entire docs directory or in the csproj file. The goal being to keep the examples simple.

Copy link
Member

Choose a reason for hiding this comment

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

I think analysis should be disabled or significantly reduced for the docs and maybe the examples directory. They're purely for instructional purposes. All the #pragmas and #ifs add noise that are not relevant to understanding the examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed all new ifs/pragmas from the documentation code.
Issues are moted granularly, per project.

@alanwest alanwest merged commit bd434cc into open-telemetry:main Jun 26, 2025
49 checks passed
@Kielek Kielek deleted the analysis-globally branch June 26, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related infra Infra work - CI/CD, code coverage, linters perf Performance related pkg:OpenTelemetry.Api.ProviderBuilderExtensions Issues related to OpenTelemetry.Api.ProviderBuilderExtensions NuGet package pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package pkg:OpenTelemetry.Exporter.Console Issues related to OpenTelemetry.Exporter.Console NuGet package pkg:OpenTelemetry.Exporter.InMemory Issues related to OpenTelemetry.Exporter.InMemory NuGet package pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package pkg:OpenTelemetry.Exporter.Zipkin Issues related to OpenTelemetry.Exporter.Zipkin NuGet package pkg:OpenTelemetry.Extensions.Hosting Issues related to OpenTelemetry.Extensions.Hosting NuGet package pkg:OpenTelemetry.Extensions.Propagators Issues related to OpenTelemetry.Extensions.Propagators NuGet package pkg:OpenTelemetry.Shims.OpenTracing Issues related to OpenTelemetry.Shims.OpenTracing NuGet package pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update all projects with Nullable, AnalysisLevel, and ImplicitUsings
4 participants