Skip to content

Commit 7ee4b66

Browse files
committed
feat: Exclude generated attributes from code coverage
1 parent becdf12 commit 7ee4b66

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

AutomaticInterface/AutomaticInterface/RegisterAttributesExtensions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ namespace AutomaticInterface
2727
/// <param name="namespaceName">Namespace name for the generated interface. Defaults to the same namespace as the class.</param>
2828
/// <param name="interfaceName">Interface name for the generated interface. Defaults to an interface version of the class name.</param>
2929
[AttributeUsage(AttributeTargets.Class)]
30+
[global::System.CodeDom.Compiler.GeneratedCode("AutomaticInterface", "")]
31+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
3032
internal sealed class {{{AutomaticInterfaceGenerator.DefaultAttributeName}}}Attribute : Attribute
3133
{
3234
internal {{{AutomaticInterfaceGenerator.DefaultAttributeName}}}Attribute(string {{{AutomaticInterfaceGenerator.NamespaceParameterName}}} = "", string {{{AutomaticInterfaceGenerator.InterfaceParameterName}}} = "", bool asInternal = false) { }
@@ -59,6 +61,8 @@ namespace AutomaticInterface
5961
/// Ignore this member in a generated Interface from this class
6062
/// </summary>
6163
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event)]
64+
[global::System.CodeDom.Compiler.GeneratedCode("AutomaticInterface", "")]
65+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
6266
internal sealed class {{{AutomaticInterfaceGenerator.IgnoreAutomaticInterfaceAttributeName}}}Attribute : Attribute
6367
{
6468
internal {{{AutomaticInterfaceGenerator.IgnoreAutomaticInterfaceAttributeName}}}Attribute() { }

0 commit comments

Comments
 (0)