From be1303c17b09b218ffa6cad5494fdc43e04257fe Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 12 Mar 2026 23:39:07 -0400 Subject: [PATCH] chore: add SlopwatchSuppressAttribute for cluster test suppressions --- .../SlopwatchSuppressAttribute.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/NATS.E2E.Cluster.Tests/SlopwatchSuppressAttribute.cs diff --git a/tests/NATS.E2E.Cluster.Tests/SlopwatchSuppressAttribute.cs b/tests/NATS.E2E.Cluster.Tests/SlopwatchSuppressAttribute.cs new file mode 100644 index 0000000..a11548e --- /dev/null +++ b/tests/NATS.E2E.Cluster.Tests/SlopwatchSuppressAttribute.cs @@ -0,0 +1,12 @@ +// Marker attribute recognised by the slopwatch static-analysis tool. +// Apply to a test method to suppress a specific slopwatch rule violation. +// The justification must be 20+ characters explaining why the suppression is intentional. + +namespace NATS.E2E.Cluster.Tests; + +[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] +public sealed class SlopwatchSuppressAttribute(string ruleId, string justification) : Attribute +{ + public string RuleId { get; } = ruleId; + public string Justification { get; } = justification; +}