From 854d3e5f4695318b8d8bff7edf4317f4a8097d3b Mon Sep 17 00:00:00 2001 From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com> Date: Sat, 3 Feb 2024 13:42:40 +0200 Subject: [PATCH] Skip coverage reporting for `Passwordless.Tests.Infra` (#113) --- .../Passwordless.Tests.Infra.csproj | 7 +++++-- tests/Passwordless.Tests.Infra/Polyfill.cs | 13 +++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/Passwordless.Tests.Infra/Passwordless.Tests.Infra.csproj b/tests/Passwordless.Tests.Infra/Passwordless.Tests.Infra.csproj index 1dda393..9e2b3dc 100644 --- a/tests/Passwordless.Tests.Infra/Passwordless.Tests.Infra.csproj +++ b/tests/Passwordless.Tests.Infra/Passwordless.Tests.Infra.csproj @@ -1,9 +1,13 @@  - netstandard2.0 + net6.0;net462 + + + + @@ -13,5 +17,4 @@ - diff --git a/tests/Passwordless.Tests.Infra/Polyfill.cs b/tests/Passwordless.Tests.Infra/Polyfill.cs index fec03c3..6a38857 100644 --- a/tests/Passwordless.Tests.Infra/Polyfill.cs +++ b/tests/Passwordless.Tests.Infra/Polyfill.cs @@ -4,7 +4,16 @@ // ReSharper disable InconsistentNaming // ReSharper disable PartialTypeWithSinglePart -namespace System.Runtime.CompilerServices; +namespace System.Runtime.CompilerServices +{ + public static class IsExternalInit; +} +#endif -public static class IsExternalInit; +#if NETFRAMEWORK +namespace System.Diagnostics.CodeAnalysis +{ + [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited = false)] + public sealed class ExcludeFromCodeCoverageAttribute : Attribute; +} #endif \ No newline at end of file