Skip to content

Commit

Permalink
Delete unused using statements (#2411)
Browse files Browse the repository at this point in the history
  • Loading branch information
mic-max authored Sep 27, 2021
1 parent 8f284e0 commit c60dc36
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ dotnet_naming_symbols.constant_fields.required_modifiers = const
[*.cs]
dotnet_diagnostic.CA1031.severity = none
dotnet_diagnostic.CA1303.severity = none
dotnet_diagnostic.IDE0001.severity = warning
dotnet_diagnostic.IDE0002.severity = warning
dotnet_diagnostic.IDE0005.severity = warning
# var preferences
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
Expand Down
1 change: 1 addition & 0 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName)</RepoRoot>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)debug.snk</AssemblyOriginatorKeyFile>
<DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

using System;
using System.Globalization;
using System.Linq;
using System.Text;
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
using System;
using System.Threading.Tasks;
using Grpc.Core;
#if NETSTANDARD2_1
using Grpc.Net.Client;
#endif
using OpenTelemetry.Exporter.OpenTelemetryProtocol;
using OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation;
using OpenTelemetry.Metrics;
using OtlpCollector = Opentelemetry.Proto.Collector.Metrics.V1;
using OtlpResource = Opentelemetry.Proto.Resource.V1;

namespace OpenTelemetry.Exporter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// </copyright>

using System;
using System.Collections.Generic;
using OpenTelemetry.Metrics;

namespace OpenTelemetry.Exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
// limitations under the License.
// </copyright>

#if NETSTANDARD2_0

using System;
using System.Threading.Tasks;

#if NETSTANDARD2_0
using Microsoft.AspNetCore.Http;

namespace OpenTelemetry.Exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
// </copyright>

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Web;
using OpenTelemetry.Context;
using OpenTelemetry.Context.Propagation;
Expand Down
14 changes: 8 additions & 6 deletions src/OpenTelemetry.Shims.OpenTracing/ScopeManagerShim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,25 @@

using System;
using System.Runtime.CompilerServices;
#if DEBUG
using System.Threading;
using global::OpenTracing;
#endif
using OpenTelemetry.Trace;
using OpenTracing;

namespace OpenTelemetry.Shims.OpenTracing
{
internal sealed class ScopeManagerShim : IScopeManager
{
private static readonly ConditionalWeakTable<TelemetrySpan, global::OpenTracing.IScope> SpanScopeTable = new ConditionalWeakTable<TelemetrySpan, global::OpenTracing.IScope>();
private static readonly ConditionalWeakTable<TelemetrySpan, IScope> SpanScopeTable = new ConditionalWeakTable<TelemetrySpan, IScope>();

private readonly Tracer tracer;

#if DEBUG
private int spanScopeTableCount;
#endif

public ScopeManagerShim(Trace.Tracer tracer)
public ScopeManagerShim(Tracer tracer)
{
this.tracer = tracer ?? throw new ArgumentNullException(nameof(tracer));
}
Expand All @@ -42,7 +44,7 @@ public ScopeManagerShim(Trace.Tracer tracer)
#endif

/// <inheritdoc/>
public global::OpenTracing.IScope Active
public IScope Active
{
get
{
Expand All @@ -62,7 +64,7 @@ public ScopeManagerShim(Trace.Tracer tracer)
}

/// <inheritdoc/>
public global::OpenTracing.IScope Activate(ISpan span, bool finishSpanOnDispose)
public IScope Activate(ISpan span, bool finishSpanOnDispose)
{
if (!(span is SpanShim shim))
{
Expand Down Expand Up @@ -93,7 +95,7 @@ public ScopeManagerShim(Trace.Tracer tracer)
return instrumentation;
}

private class ScopeInstrumentation : global::OpenTracing.IScope
private class ScopeInstrumentation : IScope
{
private readonly Action disposeAction;

Expand Down
1 change: 0 additions & 1 deletion src/OpenTelemetry/Metrics/BatchMetricPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;

namespace OpenTelemetry.Metrics
Expand Down
1 change: 0 additions & 1 deletion src/OpenTelemetry/Metrics/CompositeMetricReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using OpenTelemetry.Internal;

namespace OpenTelemetry.Metrics
{
Expand Down
2 changes: 0 additions & 2 deletions src/OpenTelemetry/Metrics/MeterProviderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
// </copyright>

using System;
using System.Diagnostics;
using System.Threading;
using OpenTelemetry.Internal;

namespace OpenTelemetry.Metrics
{
Expand Down
1 change: 0 additions & 1 deletion src/OpenTelemetry/Metrics/MeterProviderSdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// </copyright>

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using System.Linq;
Expand Down
1 change: 0 additions & 1 deletion src/OpenTelemetry/ProviderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// </copyright>

using System;
using System.Collections.Generic;
using OpenTelemetry.Logs;
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ namespace OpenTelemetry.Instrumentation.AspNet.Tests
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using OpenTelemetry.Context;
using OpenTelemetry.Context.Propagation;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Testing;
using OpenTelemetry.Metrics;
Expand Down
2 changes: 0 additions & 2 deletions test/OpenTelemetry.Tests/Metrics/AggregatorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// </copyright>

using System;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using Xunit;

namespace OpenTelemetry.Metrics.Tests
Expand Down
2 changes: 0 additions & 2 deletions test/OpenTelemetry.Tests/Metrics/MetricExporterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
// </copyright>

using System;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using Xunit;

namespace OpenTelemetry.Metrics.Tests
Expand Down

0 comments on commit c60dc36

Please sign in to comment.