From 5c3793594bc54d9fcef06eae2d6433c934398149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 4 Nov 2024 13:23:24 +0100 Subject: [PATCH 1/2] [Exporter.Geneva] Tests - move nullable disable to cs files --- .../GenevaLogExporterTests.cs | 2 ++ .../GenevaMetricExporterOptionsTests.cs | 2 ++ .../GenevaMetricExporterTests.cs | 2 ++ .../GenevaTraceExporterTests.cs | 2 ++ test/OpenTelemetry.Exporter.Geneva.Tests/JsonSerializerTests.cs | 2 ++ .../LogSerializationTests.cs | 2 ++ .../MessagePackSerializerTests.cs | 2 ++ .../OpenTelemetry.Exporter.Geneva.Tests.csproj | 1 - .../OtlpProtobufMetricExporterTests.cs | 2 ++ .../TableNameSerializerTests.cs | 2 ++ .../UnixDomainSocketDataTransportTests.cs | 2 ++ .../UnixDomainSocketEndPointTests.cs | 2 ++ 12 files changed, 22 insertions(+), 1 deletion(-) diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaLogExporterTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaLogExporterTests.cs index e5065cc143..eaa566ed9d 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaLogExporterTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaLogExporterTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Diagnostics; using System.Globalization; using System.Net.Sockets; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaMetricExporterOptionsTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaMetricExporterOptionsTests.cs index e711d89757..5ccc866188 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaMetricExporterOptionsTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaMetricExporterOptionsTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using Xunit; namespace OpenTelemetry.Exporter.Geneva.Tests; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaMetricExporterTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaMetricExporterTests.cs index 62d1176481..d7f189a0e6 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaMetricExporterTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaMetricExporterTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Diagnostics; using System.Diagnostics.Metrics; using System.Globalization; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaTraceExporterTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaTraceExporterTests.cs index c4d8d21205..6bf12ca320 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaTraceExporterTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/GenevaTraceExporterTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Diagnostics; using System.Net.Sockets; using System.Reflection; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/JsonSerializerTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/JsonSerializerTests.cs index c49a58b40c..783e3524cf 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/JsonSerializerTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/JsonSerializerTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Text; using OpenTelemetry.Exporter.Geneva.Tld; using Xunit; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/LogSerializationTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/LogSerializationTests.cs index dd311dcff1..d71cbb2cb7 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/LogSerializationTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/LogSerializationTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Net.Sockets; using System.Runtime.InteropServices; using Microsoft.Extensions.Logging; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/MessagePackSerializerTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/MessagePackSerializerTests.cs index 997a6afd87..640f78f0c0 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/MessagePackSerializerTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/MessagePackSerializerTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Globalization; using System.Text; using OpenTelemetry.Exporter.Geneva.MsgPack; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/OpenTelemetry.Exporter.Geneva.Tests.csproj b/test/OpenTelemetry.Exporter.Geneva.Tests/OpenTelemetry.Exporter.Geneva.Tests.csproj index 4cc8b83b36..31ae1a4442 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/OpenTelemetry.Exporter.Geneva.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/OpenTelemetry.Exporter.Geneva.Tests.csproj @@ -8,7 +8,6 @@ $(TargetFrameworks);net48;net472;net471;net47;net462 Unit test project for Geneva Exporters for OpenTelemetry. $(NoWarn);SA1311;SA1312;SA1313;SA1123;SA1202;OTEL1002 - disable diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/OtlpProtobufMetricExporterTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/OtlpProtobufMetricExporterTests.cs index 4870b6aee1..5ac0832ba0 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/OtlpProtobufMetricExporterTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/OtlpProtobufMetricExporterTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Diagnostics; using System.Diagnostics.Metrics; using Google.Protobuf; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/TableNameSerializerTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/TableNameSerializerTests.cs index b4b01ab8f4..636676c55c 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/TableNameSerializerTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/TableNameSerializerTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Text; using Xunit; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/UnixDomainSocketDataTransportTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/UnixDomainSocketDataTransportTests.cs index 753de5c7e0..0fb9e2302c 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/UnixDomainSocketDataTransportTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/UnixDomainSocketDataTransportTests.cs @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +#nullable disable + using System.Net.Sockets; using System.Reflection; using OpenTelemetry.Exporter.Geneva.Transports; diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/UnixDomainSocketEndPointTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/UnixDomainSocketEndPointTests.cs index d0d922ca2b..85351d141c 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/UnixDomainSocketEndPointTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/UnixDomainSocketEndPointTests.cs @@ -3,6 +3,8 @@ #if !NET +#nullable disable + using System.Net; using System.Net.Sockets; using System.Text; From efea6c419794a85192d31af270e40cae0b70657b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 4 Nov 2024 13:32:01 +0100 Subject: [PATCH 2/2] Remove #nullable enable --- src/OpenTelemetry.Instrumentation.Process/ProcessMetrics.cs | 2 -- src/Shared/ActivityHelperExtensions.cs | 2 -- src/Shared/ActivityInstrumentationHelper.cs | 2 -- src/Shared/AssemblyVersionExtensions.cs | 2 -- src/Shared/Configuration/IConfigurationExtensionsLogger.cs | 2 -- .../Configuration/OpenTelemetryConfigurationExtensions.cs | 2 -- src/Shared/DatabaseSemanticConventionHelper.cs | 2 -- src/Shared/DiagnosticSourceListener.cs | 2 -- src/Shared/DiagnosticSourceSubscriber.cs | 2 -- src/Shared/ExceptionExtensions.cs | 2 -- src/Shared/GrpcStatusCanonicalCode.cs | 2 -- src/Shared/GrpcTagHelper.cs | 2 -- src/Shared/Guard.cs | 2 -- src/Shared/ListenerHandler.cs | 2 -- src/Shared/MultiTypePropertyFetcher.cs | 2 -- .../DelegatingOptionsFactoryServiceCollectionExtensions.cs | 2 -- src/Shared/Options/SingletonOptionsManager.cs | 2 -- src/Shared/PropertyFetcher.AOT.cs | 2 -- src/Shared/RedactionHelper.cs | 2 -- src/Shared/RequestDataHelper.cs | 2 -- .../UnixUserEventsDataTransportTests.cs | 2 -- .../Processors/EventsActivityProcessorTests.cs | 2 -- .../RouteTests/RoutingTestCases.cs | 2 -- .../RouteTests/RoutingTestFixture.cs | 2 -- .../RouteTests/RoutingTestResult.cs | 2 -- .../RouteTests/RoutingTests.cs | 2 -- .../RouteTests/TestApplication/ActionDescriptorInfo.cs | 1 - .../TestApplication/ControllerActionDescriptorInfo.cs | 1 - .../RouteTests/TestApplication/PageActionDescriptorInfo.cs | 1 - .../RouteTests/TestApplication/RouteInfo.cs | 2 -- .../RouteTests/TestApplication/RouteInfoDiagnosticObserver.cs | 2 -- .../RouteTests/TestApplication/TestApplicationFactory.cs | 2 -- .../RouteTests/TestCase.cs | 1 - test/Shared/CustomTextMapPropagator.cs | 2 -- test/Shared/EventSourceTestHelper.cs | 2 -- test/Shared/InMemoryEventListener.cs | 2 -- test/Shared/PlatformHelpers.cs | 2 -- test/Shared/SkipUnlessEnvVarFoundFactAttribute.cs | 2 -- test/Shared/SkipUnlessEnvVarFoundTheoryAttribute.cs | 2 -- test/Shared/TestActivityExportProcessor.cs | 2 -- test/Shared/TestActivityProcessor.cs | 2 -- test/Shared/TestEventListener.cs | 2 -- test/Shared/TestHttpServer.cs | 2 -- test/Shared/TestSampler.cs | 2 -- test/Shared/TestTextMapPropagator.cs | 2 -- 45 files changed, 86 deletions(-) diff --git a/src/OpenTelemetry.Instrumentation.Process/ProcessMetrics.cs b/src/OpenTelemetry.Instrumentation.Process/ProcessMetrics.cs index 15fab0e0fa..abf8f996bf 100644 --- a/src/OpenTelemetry.Instrumentation.Process/ProcessMetrics.cs +++ b/src/OpenTelemetry.Instrumentation.Process/ProcessMetrics.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics.Metrics; using System.Reflection; using OpenTelemetry.Internal; diff --git a/src/Shared/ActivityHelperExtensions.cs b/src/Shared/ActivityHelperExtensions.cs index 7425c97edc..2e5430ead6 100644 --- a/src/Shared/ActivityHelperExtensions.cs +++ b/src/Shared/ActivityHelperExtensions.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/Shared/ActivityInstrumentationHelper.cs b/src/Shared/ActivityInstrumentationHelper.cs index 02a0d83e16..0f7ec41d1a 100644 --- a/src/Shared/ActivityInstrumentationHelper.cs +++ b/src/Shared/ActivityInstrumentationHelper.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; namespace OpenTelemetry.Instrumentation; diff --git a/src/Shared/AssemblyVersionExtensions.cs b/src/Shared/AssemblyVersionExtensions.cs index 4c71ae3598..953de906cc 100644 --- a/src/Shared/AssemblyVersionExtensions.cs +++ b/src/Shared/AssemblyVersionExtensions.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using System.Reflection; diff --git a/src/Shared/Configuration/IConfigurationExtensionsLogger.cs b/src/Shared/Configuration/IConfigurationExtensionsLogger.cs index 0835cf6ff8..196a485bf3 100644 --- a/src/Shared/Configuration/IConfigurationExtensionsLogger.cs +++ b/src/Shared/Configuration/IConfigurationExtensionsLogger.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - namespace Microsoft.Extensions.Configuration; internal interface IConfigurationExtensionsLogger diff --git a/src/Shared/Configuration/OpenTelemetryConfigurationExtensions.cs b/src/Shared/Configuration/OpenTelemetryConfigurationExtensions.cs index e663c53a67..3637927de2 100644 --- a/src/Shared/Configuration/OpenTelemetryConfigurationExtensions.cs +++ b/src/Shared/Configuration/OpenTelemetryConfigurationExtensions.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; #if NET || NETSTANDARD2_1 using System.Diagnostics.CodeAnalysis; diff --git a/src/Shared/DatabaseSemanticConventionHelper.cs b/src/Shared/DatabaseSemanticConventionHelper.cs index a3bc4b5e98..1225e43069 100644 --- a/src/Shared/DatabaseSemanticConventionHelper.cs +++ b/src/Shared/DatabaseSemanticConventionHelper.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics.CodeAnalysis; using Microsoft.Extensions.Configuration; diff --git a/src/Shared/DiagnosticSourceListener.cs b/src/Shared/DiagnosticSourceListener.cs index 3ffad9bf33..9b0b07b3c8 100644 --- a/src/Shared/DiagnosticSourceListener.cs +++ b/src/Shared/DiagnosticSourceListener.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using OpenTelemetry.Internal; diff --git a/src/Shared/DiagnosticSourceSubscriber.cs b/src/Shared/DiagnosticSourceSubscriber.cs index 3318216db0..87863b2193 100644 --- a/src/Shared/DiagnosticSourceSubscriber.cs +++ b/src/Shared/DiagnosticSourceSubscriber.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using OpenTelemetry.Internal; diff --git a/src/Shared/ExceptionExtensions.cs b/src/Shared/ExceptionExtensions.cs index 9070b59c20..5071a8feeb 100644 --- a/src/Shared/ExceptionExtensions.cs +++ b/src/Shared/ExceptionExtensions.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Globalization; namespace OpenTelemetry.Internal; diff --git a/src/Shared/GrpcStatusCanonicalCode.cs b/src/Shared/GrpcStatusCanonicalCode.cs index d4ec2cf7fb..8abad05f25 100644 --- a/src/Shared/GrpcStatusCanonicalCode.cs +++ b/src/Shared/GrpcStatusCanonicalCode.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - namespace OpenTelemetry.Instrumentation; /// diff --git a/src/Shared/GrpcTagHelper.cs b/src/Shared/GrpcTagHelper.cs index d7c22b1c63..7911cc5c7d 100644 --- a/src/Shared/GrpcTagHelper.cs +++ b/src/Shared/GrpcTagHelper.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using System.Text.RegularExpressions; using OpenTelemetry.Trace; diff --git a/src/Shared/Guard.cs b/src/Shared/Guard.cs index a00cfafb09..d8b88d6a07 100644 --- a/src/Shared/Guard.cs +++ b/src/Shared/Guard.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - // Note: For some targets this file will contain more than one type/namespace. #pragma warning disable IDE0161 // Convert to file-scoped namespace diff --git a/src/Shared/ListenerHandler.cs b/src/Shared/ListenerHandler.cs index a7c6f9049d..d711aab6b0 100644 --- a/src/Shared/ListenerHandler.cs +++ b/src/Shared/ListenerHandler.cs @@ -3,8 +3,6 @@ using System.Diagnostics; -#nullable enable - namespace OpenTelemetry.Instrumentation; /// diff --git a/src/Shared/MultiTypePropertyFetcher.cs b/src/Shared/MultiTypePropertyFetcher.cs index 1370094a58..b5f82fd86d 100644 --- a/src/Shared/MultiTypePropertyFetcher.cs +++ b/src/Shared/MultiTypePropertyFetcher.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Collections.Concurrent; using System.Reflection; diff --git a/src/Shared/Options/DelegatingOptionsFactoryServiceCollectionExtensions.cs b/src/Shared/Options/DelegatingOptionsFactoryServiceCollectionExtensions.cs index b3b9736277..81e9ac0a66 100644 --- a/src/Shared/Options/DelegatingOptionsFactoryServiceCollectionExtensions.cs +++ b/src/Shared/Options/DelegatingOptionsFactoryServiceCollectionExtensions.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; #if NET using System.Diagnostics.CodeAnalysis; diff --git a/src/Shared/Options/SingletonOptionsManager.cs b/src/Shared/Options/SingletonOptionsManager.cs index 4c7718e78c..d3b1928d55 100644 --- a/src/Shared/Options/SingletonOptionsManager.cs +++ b/src/Shared/Options/SingletonOptionsManager.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - #if NET using System.Diagnostics.CodeAnalysis; #endif diff --git a/src/Shared/PropertyFetcher.AOT.cs b/src/Shared/PropertyFetcher.AOT.cs index 209f91cada..19b3153814 100644 --- a/src/Shared/PropertyFetcher.AOT.cs +++ b/src/Shared/PropertyFetcher.AOT.cs @@ -5,8 +5,6 @@ // Usages of the non-AOT-compatible version can be moved over to this one when they need to support AOT/trimming. // Copied from https://github.com/open-telemetry/opentelemetry-dotnet/blob/86a6ba0b7f7ed1f5e84e5a6610e640989cd3ae9f/src/Shared/DiagnosticSourceInstrumentation/PropertyFetcher.cs#L30 -#nullable enable - #if NETSTANDARD2_1_0_OR_GREATER || NET using System.Diagnostics.CodeAnalysis; #endif diff --git a/src/Shared/RedactionHelper.cs b/src/Shared/RedactionHelper.cs index 045d99cad2..ed34bb3e4f 100644 --- a/src/Shared/RedactionHelper.cs +++ b/src/Shared/RedactionHelper.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Text; namespace OpenTelemetry.Internal; diff --git a/src/Shared/RequestDataHelper.cs b/src/Shared/RequestDataHelper.cs index 6acce7fe40..edd9532569 100644 --- a/src/Shared/RequestDataHelper.cs +++ b/src/Shared/RequestDataHelper.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - #if NET using System.Collections.Frozen; #endif diff --git a/test/OpenTelemetry.Exporter.Geneva.Tests/UnixUserEventsDataTransportTests.cs b/test/OpenTelemetry.Exporter.Geneva.Tests/UnixUserEventsDataTransportTests.cs index 6cc7956eb9..4af7484581 100644 --- a/test/OpenTelemetry.Exporter.Geneva.Tests/UnixUserEventsDataTransportTests.cs +++ b/test/OpenTelemetry.Exporter.Geneva.Tests/UnixUserEventsDataTransportTests.cs @@ -3,8 +3,6 @@ #if NET6_0_OR_GREATER -#nullable enable - using System.Diagnostics; using System.Globalization; using System.Text.RegularExpressions; diff --git a/test/OpenTelemetry.Exporter.Instana.Tests/Processors/EventsActivityProcessorTests.cs b/test/OpenTelemetry.Exporter.Instana.Tests/Processors/EventsActivityProcessorTests.cs index 35452ace15..7b46ec5013 100644 --- a/test/OpenTelemetry.Exporter.Instana.Tests/Processors/EventsActivityProcessorTests.cs +++ b/test/OpenTelemetry.Exporter.Instana.Tests/Processors/EventsActivityProcessorTests.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using OpenTelemetry.Exporter.Instana.Implementation; using OpenTelemetry.Exporter.Instana.Implementation.Processors; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestCases.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestCases.cs index e14243fbbe..f02b4203fe 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestCases.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestCases.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Reflection; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestFixture.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestFixture.cs index fdb42af421..a49503722b 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestFixture.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestFixture.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Globalization; using System.Text; using Microsoft.AspNetCore.Builder; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestResult.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestResult.cs index f1df77ba10..affa074c20 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestResult.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTestResult.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Text.Json; using System.Text.Json.Serialization; using RouteTests.TestApplication; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTests.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTests.cs index c6cbc6fba4..93199709ea 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTests.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/RoutingTests.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using OpenTelemetry; using OpenTelemetry.Metrics; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/ActionDescriptorInfo.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/ActionDescriptorInfo.cs index 98c15a18ba..e0df2673e8 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/ActionDescriptorInfo.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/ActionDescriptorInfo.cs @@ -1,7 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable using System.Text.Json.Serialization; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.Controllers; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/ControllerActionDescriptorInfo.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/ControllerActionDescriptorInfo.cs index ae5ef6b907..34260c4889 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/ControllerActionDescriptorInfo.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/ControllerActionDescriptorInfo.cs @@ -1,7 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable using System.Text.Json.Serialization; namespace RouteTests.TestApplication; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/PageActionDescriptorInfo.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/PageActionDescriptorInfo.cs index dda48ae462..bdaf96851a 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/PageActionDescriptorInfo.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/PageActionDescriptorInfo.cs @@ -1,7 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable using System.Text.Json.Serialization; namespace RouteTests.TestApplication; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/RouteInfo.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/RouteInfo.cs index 0d8d2e9668..2754617e78 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/RouteInfo.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/RouteInfo.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Text.Json.Serialization; using Microsoft.AspNetCore.Http; #if NET diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/RouteInfoDiagnosticObserver.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/RouteInfoDiagnosticObserver.cs index e5e4025ec4..a144f56b58 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/RouteInfoDiagnosticObserver.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/RouteInfoDiagnosticObserver.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc.Diagnostics; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/TestApplicationFactory.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/TestApplicationFactory.cs index cc9d682db6..c50fe412f2 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/TestApplicationFactory.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestApplication/TestApplicationFactory.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Diagnostics; diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestCase.cs b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestCase.cs index 36710fe4a9..f4e07d2388 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestCase.cs +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/RouteTests/TestCase.cs @@ -1,7 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable using RouteTests.TestApplication; namespace RouteTests; diff --git a/test/Shared/CustomTextMapPropagator.cs b/test/Shared/CustomTextMapPropagator.cs index 8d3404e816..436879e8b5 100644 --- a/test/Shared/CustomTextMapPropagator.cs +++ b/test/Shared/CustomTextMapPropagator.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; using OpenTelemetry.Context.Propagation; diff --git a/test/Shared/EventSourceTestHelper.cs b/test/Shared/EventSourceTestHelper.cs index 02de7a2a76..837f3cd569 100644 --- a/test/Shared/EventSourceTestHelper.cs +++ b/test/Shared/EventSourceTestHelper.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics.Tracing; using System.Globalization; using System.Reflection; diff --git a/test/Shared/InMemoryEventListener.cs b/test/Shared/InMemoryEventListener.cs index bf3d3fd567..4ddb42bb52 100644 --- a/test/Shared/InMemoryEventListener.cs +++ b/test/Shared/InMemoryEventListener.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Collections.Concurrent; using System.Diagnostics.Tracing; diff --git a/test/Shared/PlatformHelpers.cs b/test/Shared/PlatformHelpers.cs index a737fa49f3..22b9c3a570 100644 --- a/test/Shared/PlatformHelpers.cs +++ b/test/Shared/PlatformHelpers.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - #pragma warning disable SA1649 // File name should match first type name #pragma warning disable SA1402 // File may only contain a single type diff --git a/test/Shared/SkipUnlessEnvVarFoundFactAttribute.cs b/test/Shared/SkipUnlessEnvVarFoundFactAttribute.cs index d6e4f02518..88bedacb31 100644 --- a/test/Shared/SkipUnlessEnvVarFoundFactAttribute.cs +++ b/test/Shared/SkipUnlessEnvVarFoundFactAttribute.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using Xunit; namespace OpenTelemetry.Tests; diff --git a/test/Shared/SkipUnlessEnvVarFoundTheoryAttribute.cs b/test/Shared/SkipUnlessEnvVarFoundTheoryAttribute.cs index 5820d36bef..2e43f8cb19 100644 --- a/test/Shared/SkipUnlessEnvVarFoundTheoryAttribute.cs +++ b/test/Shared/SkipUnlessEnvVarFoundTheoryAttribute.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using Xunit; namespace OpenTelemetry.Tests; diff --git a/test/Shared/TestActivityExportProcessor.cs b/test/Shared/TestActivityExportProcessor.cs index 0c4dadfb16..b882af8f8e 100644 --- a/test/Shared/TestActivityExportProcessor.cs +++ b/test/Shared/TestActivityExportProcessor.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; namespace OpenTelemetry.Tests; diff --git a/test/Shared/TestActivityProcessor.cs b/test/Shared/TestActivityProcessor.cs index b788c5fa7c..e0319da15a 100644 --- a/test/Shared/TestActivityProcessor.cs +++ b/test/Shared/TestActivityProcessor.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics; namespace OpenTelemetry.Tests; diff --git a/test/Shared/TestEventListener.cs b/test/Shared/TestEventListener.cs index 424ba512a6..29cb03d6bc 100644 --- a/test/Shared/TestEventListener.cs +++ b/test/Shared/TestEventListener.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using System.Diagnostics.Tracing; namespace OpenTelemetry.Tests; diff --git a/test/Shared/TestHttpServer.cs b/test/Shared/TestHttpServer.cs index c567606649..d294ff24eb 100644 --- a/test/Shared/TestHttpServer.cs +++ b/test/Shared/TestHttpServer.cs @@ -4,8 +4,6 @@ // Note: When implicit usings are enabled in a project this file will generate // warnings/errors without this suppression. -#nullable enable - using System.Net; #if !NETFRAMEWORK using System.Security.Cryptography; diff --git a/test/Shared/TestSampler.cs b/test/Shared/TestSampler.cs index c23bf68ed1..972985bfad 100644 --- a/test/Shared/TestSampler.cs +++ b/test/Shared/TestSampler.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using OpenTelemetry.Trace; namespace OpenTelemetry.Tests; diff --git a/test/Shared/TestTextMapPropagator.cs b/test/Shared/TestTextMapPropagator.cs index ba58606acf..5ce7fd9bd3 100644 --- a/test/Shared/TestTextMapPropagator.cs +++ b/test/Shared/TestTextMapPropagator.cs @@ -1,8 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -#nullable enable - using OpenTelemetry.Context.Propagation; namespace OpenTelemetry.Tests;