Skip to content

Commit

Permalink
xunit/xunit#2682: Apply assembly-wide ExcludeFromCodeCoverageAttribut…
Browse files Browse the repository at this point in the history
…e (visualstudio)
  • Loading branch information
bradwilson committed May 20, 2023
1 parent 378f79b commit 86c0e57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/xunit.runner.visualstudio/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[assembly: System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]

#if NETFRAMEWORK
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 { }
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<DevelopmentDependency>true</DevelopmentDependency>
<BuildOutputTargetFolder>build</BuildOutputTargetFolder>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<NoWarn>$(NoWarn)1701;1702;NU5105</NoWarn>
<NoWarn>$(NoWarn);CS0436</NoWarn>
<!-- Set the PackageId explicitly as our different AssemblyNames will cause restore errors otherwise -->
<PackageId>xunit.runner.visualstudio</PackageId>
</PropertyGroup>
Expand Down

0 comments on commit 86c0e57

Please sign in to comment.