From 104c9f0e82d2ae7c4b0fb8ee30ff2b53a9802dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 4 Sep 2024 18:34:20 +0200 Subject: [PATCH] [repo] Extend NugetAudit by indirect references (#5812) --- Directory.Packages.props | 14 +++++++------- build/Common.props | 2 ++ .../WorkerService/WorkerService.csproj | 2 ++ test/Directory.Packages.props | 2 +- .../OpenTelemetry.Api.Tests.csproj | 2 ++ ...try.Exporter.OpenTelemetryProtocol.Tests.csproj | 2 ++ ...try.Exporter.Prometheus.AspNetCore.Tests.csproj | 2 ++ ...y.Exporter.Prometheus.HttpListener.Tests.csproj | 2 ++ .../OpenTelemetry.Exporter.Zipkin.Tests.csproj | 2 ++ .../OpenTelemetry.Extensions.Hosting.Tests.csproj | 2 ++ .../OpenTelemetry.Shims.OpenTracing.Tests.csproj | 2 ++ .../Metrics/MetricApiTestsBase.cs | 2 +- .../OpenTelemetry.Tests/OpenTelemetry.Tests.csproj | 3 ++- 13 files changed, 29 insertions(+), 10 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index bfe09403ee5..abe3785ad8d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -81,9 +81,9 @@ - + - + @@ -92,15 +92,15 @@ - - - + + + - + - + diff --git a/build/Common.props b/build/Common.props index e526f543e93..7c1f02bdebf 100644 --- a/build/Common.props +++ b/build/Common.props @@ -10,6 +10,8 @@ enable enable true + all + low $(NoWarn);OTEL1000;OTEL1001;OTEL1002;OTEL1003;OTEL1004 diff --git a/examples/MicroserviceExample/WorkerService/WorkerService.csproj b/examples/MicroserviceExample/WorkerService/WorkerService.csproj index b9b1a680772..f10cebc2d7e 100644 --- a/examples/MicroserviceExample/WorkerService/WorkerService.csproj +++ b/examples/MicroserviceExample/WorkerService/WorkerService.csproj @@ -6,6 +6,8 @@ + + diff --git a/test/Directory.Packages.props b/test/Directory.Packages.props index b3769fc1459..d6755d05725 100644 --- a/test/Directory.Packages.props +++ b/test/Directory.Packages.props @@ -4,6 +4,6 @@ - + diff --git a/test/OpenTelemetry.Api.Tests/OpenTelemetry.Api.Tests.csproj b/test/OpenTelemetry.Api.Tests/OpenTelemetry.Api.Tests.csproj index 08073d127f7..c8463d88343 100644 --- a/test/OpenTelemetry.Api.Tests/OpenTelemetry.Api.Tests.csproj +++ b/test/OpenTelemetry.Api.Tests/OpenTelemetry.Api.Tests.csproj @@ -27,5 +27,7 @@ runtime; build; native; contentfiles; analyzers + + diff --git a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj index 21b320de546..ed31a950360 100644 --- a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj +++ b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj @@ -14,6 +14,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/test/OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests/OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests.csproj b/test/OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests/OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests.csproj index 97e6f15e108..b361d72e7ee 100644 --- a/test/OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests/OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests/OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests.csproj @@ -15,6 +15,8 @@ runtime; build; native; contentfiles; analyzers + + diff --git a/test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj b/test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj index f4901706361..295231183c2 100644 --- a/test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests.csproj @@ -14,6 +14,8 @@ runtime; build; native; contentfiles; analyzers + + diff --git a/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj b/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj index f5a72a2f25f..31636f33157 100644 --- a/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj @@ -22,6 +22,8 @@ runtime; build; native; contentfiles; analyzers + + diff --git a/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj b/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj index 1ea17a421de..7dec47d5464 100644 --- a/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj +++ b/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj @@ -41,5 +41,7 @@ runtime; build; native; contentfiles; analyzers + + diff --git a/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj b/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj index 1aac45f10ca..430bb7057e2 100644 --- a/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj +++ b/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj @@ -12,6 +12,8 @@ + + diff --git a/test/OpenTelemetry.Tests/Metrics/MetricApiTestsBase.cs b/test/OpenTelemetry.Tests/Metrics/MetricApiTestsBase.cs index cc5a34d7fd1..41726da14d7 100644 --- a/test/OpenTelemetry.Tests/Metrics/MetricApiTestsBase.cs +++ b/test/OpenTelemetry.Tests/Metrics/MetricApiTestsBase.cs @@ -236,7 +236,7 @@ public void MetricInstrumentationScopeAttributesAreNotTreatedAsIdentifyingProper Assert.Equal(meterVersion, metric.MeterVersion); Assert.Single(metric.MeterTags.Where(kvp => kvp.Key == meterTags1[0].Key && kvp.Value == meterTags1[0].Value)); - Assert.Empty(metric.MeterTags.Where(kvp => kvp.Key == meterTags2[0].Key && kvp.Value == meterTags2[0].Value)); + Assert.DoesNotContain(metric.MeterTags, kvp => kvp.Key == meterTags2[0].Key && kvp.Value == meterTags2[0].Value); List metricPoints = new List(); foreach (ref readonly var mp in metric.GetMetricPoints()) diff --git a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj index 2a2532c07e9..96304bf6c6c 100644 --- a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj +++ b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj @@ -15,7 +15,6 @@ - @@ -32,5 +31,7 @@ runtime; build; native; contentfiles; analyzers + +