Skip to content

Commit

Permalink
[repo] Cleanup unused using statements (#4759)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch authored Aug 9, 2023
1 parent 10a8989 commit 594d130
Show file tree
Hide file tree
Showing 36 changed files with 53 additions and 49 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/apicompatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-aot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: publish AOT testApp, assert static analysis warning count, and run the app
shell: pwsh
run: .\build\test-aot-compatibility.ps1 ${{ matrix.version }}
3 changes: 3 additions & 0 deletions .github/workflows/ci-instrumentation-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore ./build/InstrumentationLibraries.proj

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- name: check out code
uses: actions/checkout@v3

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install format tool
run: dotnet tool install -g dotnet-format

Expand Down
4 changes: 3 additions & 1 deletion OpenTelemetry.sln
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7CB2F02E
build\process-codecoverage.ps1 = build\process-codecoverage.ps1
build\RELEASING.md = build\RELEASING.md
build\stylecop.json = build\stylecop.json
build\xunit.runner.json = build\xunit.runner.json
build\test-aot-compatibility.ps1 = build\test-aot-compatibility.ps1
build\xunit.runner.json = build\xunit.runner.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Zipkin", "src\OpenTelemetry.Exporter.Zipkin\OpenTelemetry.Exporter.Zipkin.csproj", "{7EDAE7FA-B44E-42CA-80FA-7DF2FAA2C5DD}"
Expand Down Expand Up @@ -97,6 +97,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
ProjectSection(SolutionItems) = preProject
.github\workflows\apicompatibility.yml = .github\workflows\apicompatibility.yml
.github\workflows\ci-aot.yml = .github\workflows\ci-aot.yml
.github\workflows\ci-instrumentation-libraries-md.yml = .github\workflows\ci-instrumentation-libraries-md.yml
.github\workflows\ci-instrumentation-libraries.yml = .github\workflows\ci-instrumentation-libraries.yml
.github\workflows\ci-md.yml = .github\workflows\ci-md.yml
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\code-coverage.yml = .github\workflows\code-coverage.yml
Expand Down
1 change: 1 addition & 0 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)debug.snk</AssemblyOriginatorKeyFile>
<DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!--temporarily disable. See 3958-->
Expand Down
2 changes: 1 addition & 1 deletion build/docker-compose.net6.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ services:
args:
PUBLISH_FRAMEWORK: net6.0
TEST_SDK_VERSION: "6.0"
BUILD_SDK_VERSION: "7.0.306"
BUILD_SDK_VERSION: "7.0"
2 changes: 1 addition & 1 deletion build/docker-compose.net7.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ services:
args:
PUBLISH_FRAMEWORK: net7.0
TEST_SDK_VERSION: "7.0"
BUILD_SDK_VERSION: "7.0.306"
BUILD_SDK_VERSION: "7.0"
1 change: 0 additions & 1 deletion docs/metrics/getting-started-aspnetcore/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// limitations under the License.
// </copyright>

using System.Diagnostics;
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;

Expand Down
4 changes: 0 additions & 4 deletions docs/trace/getting-started-jaeger/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@
// limitations under the License.
// </copyright>

using System;
using System.Diagnostics;
using System.Net.Http;
using System.Threading.Tasks;
using OpenTelemetry;
using OpenTelemetry.Exporter;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"rollForward": "latestFeature",
"version": "7.0.101"
"version": "7.0.400"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// limitations under the License.
// </copyright>

#if NETFRAMEWORK
using System.Net.Http;
#endif
using OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.ExportClient;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
// </copyright>

using System.Diagnostics;
using System.Net.Http;
#if !NET6_0_OR_GREATER
using System.Threading.Tasks;
using System.Net.Http;
#endif
using Moq;
using Moq.Protected;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
// </copyright>

#if !NETFRAMEWORK
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Grpc.Core;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
Expand Down Expand Up @@ -69,13 +65,13 @@ public async Task TestRecoveryAfterFailedExport()
}))
.StartAsync().ConfigureAwait(false);

var httpClient = new HttpClient() { BaseAddress = new System.Uri("http://localhost:5050") };
var httpClient = new HttpClient() { BaseAddress = new Uri("http://localhost:5050") };

var codes = new[] { Grpc.Core.StatusCode.Unimplemented, Grpc.Core.StatusCode.OK };
await httpClient.GetAsync($"/MockCollector/SetResponseCodes/{string.Join(",", codes.Select(x => (int)x))}").ConfigureAwait(false);

var exportResults = new List<ExportResult>();
var otlpExporter = new OtlpTraceExporter(new OtlpExporterOptions() { Endpoint = new System.Uri("http://localhost:4317") });
var otlpExporter = new OtlpTraceExporter(new OtlpExporterOptions() { Endpoint = new Uri("http://localhost:4317") });
var delegatingExporter = new DelegatingExporter<Activity>
{
OnExportFunc = (batch) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// limitations under the License.
// </copyright>

using Grpc.Core;
using OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.ExportClient;
using Xunit;
using Xunit.Sdk;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// limitations under the License.
// </copyright>

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Reflection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
// </copyright>

using System.Diagnostics.Metrics;
#if NETFRAMEWORK
using System.Linq;
#endif
using OpenTelemetry.Metrics;
using OpenTelemetry.Tests;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

using System.Diagnostics.Metrics;
using System.Net;
#if NETFRAMEWORK
using System.Net.Http;
#endif
using OpenTelemetry.Metrics;
using OpenTelemetry.Tests;
using Xunit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Net;
#if NETFRAMEWORK
using System.Net.Http;
#endif
using System.Text;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@

#if NET6_0_OR_GREATER

using System;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using System.Net;
using System.Threading.Tasks;

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// limitations under the License.
// </copyright>

#if NETFRAMEWORK
using System.Net.Http;
#endif
using System.Net.Http.Headers;
using Google.Protobuf;
using Grpc.Net.Compression;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
using System.Buffers.Binary;
using System.Diagnostics;
using System.Net;
#if NETFRAMEWORK
using System.Net.Http;
#endif
using System.Net.Http.Headers;

namespace OpenTelemetry.Instrumentation.Grpc.Tests.GrpcTestHelpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// limitations under the License.
// </copyright>

#if NETFRAMEWORK
using System.Net.Http;
#endif

namespace OpenTelemetry.Instrumentation.Grpc.Tests.GrpcTestHelpers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// limitations under the License.
// </copyright>

#if NETFRAMEWORK
using System.Net.Http;
#endif
using System.Net.Http.Headers;

namespace OpenTelemetry.Instrumentation.Grpc.Tests.GrpcTestHelpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@
using System.Diagnostics;
using System.Net;
using Greet;
#if !NETFRAMEWORK
using Grpc.Core;
#endif
using Grpc.Net.Client;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Moq;
#if !NETFRAMEWORK
using OpenTelemetry.Context.Propagation;
#endif
using OpenTelemetry.Instrumentation.Grpc.Tests.GrpcTestHelpers;
using OpenTelemetry.Instrumentation.GrpcNetClient;
using OpenTelemetry.Instrumentation.GrpcNetClient.Implementation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
using System.Diagnostics;
#if NETFRAMEWORK
using System.Net;
#endif
using System.Net.Http;
#endif
using Microsoft.Extensions.DependencyInjection;
using Moq;
using OpenTelemetry.Context.Propagation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
// </copyright>

using System.Diagnostics;
#if NETFRAMEWORK
using System.Net.Http;
#endif
using System.Reflection;
using System.Text.Json;
using Moq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@
// </copyright>

#if NETFRAMEWORK
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using OpenTelemetry.Instrumentation.Http.Implementation;
using OpenTelemetry.Tests;
using OpenTelemetry.Trace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@
// </copyright>

#if NETFRAMEWORK
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using OpenTelemetry.Instrumentation.Http.Implementation;
using OpenTelemetry.Tests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@
// </copyright>

#if NETFRAMEWORK
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using OpenTelemetry.Instrumentation.Http.Implementation;
using OpenTelemetry.Tests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

using System.Diagnostics;
using System.Net;
#if !NETFRAMEWORK
using System.Net.Http;
#endif
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Moq;
Expand Down
2 changes: 2 additions & 0 deletions test/OpenTelemetry.Instrumentation.Http.Tests/RetryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// limitations under the License.
// </copyright>

#if NETFRAMEWORK
using System.Net.Http;
#endif

namespace OpenTelemetry.Tests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.DependencyInjection;
using OpenTelemetry.Instrumentation.SqlClient.Implementation;
#if !NETFRAMEWORK
using OpenTelemetry.Tests;
#endif
using OpenTelemetry.Trace;
using Xunit;

Expand Down
Loading

0 comments on commit 594d130

Please sign in to comment.