-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
56 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Qowaiv.Diagnostics.Contracts; | ||
|
||
/// <summary>Indicates the class is empty by design.</summary> | ||
/// <remarks> | ||
/// Using this attribute prevents S2094 (Classes should not be empty) from | ||
/// showing up. | ||
/// </remarks> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] | ||
[Conditional("CONTRACTS_FULL")] | ||
public class EmptyClassAttribute(string justification) : EmptyTypeAttribute(justification) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Qowaiv.Diagnostics.Contracts; | ||
|
||
/// <summary>Indicates the enum is empty by design.</summary> | ||
[AttributeUsage(AttributeTargets.Enum, AllowMultiple = false)] | ||
[Conditional("CONTRACTS_FULL")] | ||
public class EmptyEnumAttribute(string justification) : EmptyTypeAttribute(justification) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Qowaiv.Diagnostics.Contracts; | ||
|
||
/// <summary>Indicates the class is empty by design.</summary> | ||
[AttributeUsage(AttributeTargets.Interface, AllowMultiple = false)] | ||
[Conditional("CONTRACTS_FULL")] | ||
public class EmptyInterfaceAttribute(string justification) : EmptyTypeAttribute(justification) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Qowaiv.Diagnostics.Contracts; | ||
|
||
/// <summary>Indicates the struct is empty by design.</summary> | ||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] | ||
[Conditional("CONTRACTS_FULL")] | ||
public class EmptyStructAttribute(string justification) : EmptyTypeAttribute(justification) { } |
10 changes: 10 additions & 0 deletions
10
src/Qowaiv.Diagnostics.Contracts/EmptyTestClassAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Qowaiv.Diagnostics.Contracts; | ||
|
||
/// <summary>Indicates the class is empty by design.</summary> | ||
/// <remarks> | ||
/// Using this attribute prevents S2094 (Classes should not be empty) from | ||
/// showing up. | ||
/// </remarks> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] | ||
[Conditional("CONTRACTS_FULL")] | ||
public sealed class EmptyTestClassAttribute(string? justification = null) : EmptyClassAttribute(justification ?? "For test purposes.") { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Qowaiv.Diagnostics.Contracts; | ||
|
||
/// <summary>Indicates the enum is empty by design.</summary> | ||
[AttributeUsage(AttributeTargets.Enum, AllowMultiple = false)] | ||
[Conditional("CONTRACTS_FULL")] | ||
public sealed class EmptyTestEnumAttribute(string? justification = null) : EmptyEnumAttribute(justification ?? "For test purposes.") { } |
6 changes: 6 additions & 0 deletions
6
src/Qowaiv.Diagnostics.Contracts/EmptyTestInterfaceAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Qowaiv.Diagnostics.Contracts; | ||
|
||
/// <summary>Indicates the class is empty by design.</summary> | ||
[AttributeUsage(AttributeTargets.Interface, AllowMultiple = false)] | ||
[Conditional("CONTRACTS_FULL")] | ||
public sealed class EmptyTestInterfaceAttribute(string? justification = null) : EmptyInterfaceAttribute(justification ?? "For test purposes.") { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Qowaiv.Diagnostics.Contracts; | ||
|
||
/// <summary>Indicates the struct is empty by design.</summary> | ||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] | ||
[Conditional("CONTRACTS_FULL")] | ||
public sealed class EmptyTestStructAttribute(string? justification = null) : EmptyStructAttribute(justification ?? "For test purposes.") { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters