Skip to content

Commit

Permalink
fix: exclude loggers from code coverage. See #64 and #72. (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
codito authored Feb 10, 2024
1 parent 13bdacb commit 9c351e9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MSTestVersion>2.0.0</MSTestVersion>
<NETTestSdkVersion>15.7.2</NETTestSdkVersion>
<MoqVersion>4.9.0</MoqVersion>
<TestLoggerVersion>3.1.138</TestLoggerVersion>
<TestLoggerVersion>3.1.140</TestLoggerVersion>

<!-- Test Assets use the minimum supported versions -->
<NETTestSdkMinimumVersion>15.5.0</NETTestSdkMinimumVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="..\JUnit.Xml.TestLogger\Assembly.cs" Link="Assembly.cs" />
<Compile Include="..\JUnit.Xml.TestLogger\JunitXmlSerializer.cs" Link="JunitXmlSerializer.cs" />
<Compile Include="..\JUnit.Xml.TestLogger\JUnitXmlTestLogger.cs" Link="JUnitXmlTestLogger.cs" />
</ItemGroup>
Expand Down
16 changes: 16 additions & 0 deletions src/JUnit.Xml.TestLogger/Assembly.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) Spekt Contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

// <auto-generated>
// Skip code analysis errors.
// </auto-generated>

using System.Diagnostics.CodeAnalysis;

[assembly: ExcludeFromCodeCoverage]

namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
internal sealed class ExcludeFromCodeCoverageAttribute : Attribute { }
}

0 comments on commit 9c351e9

Please sign in to comment.