fix(rules): suppress S3875 on intentional DSL operator==
Resolves SonarQube S3875 (BLOCKER) in Expression.Operators.cs. The operator== returns a Comparison expression (DSL semantics), not a bool. The existing CS0660/CS0661 pragma already documents this design; the new SuppressMessage attribute makes the Sonar analyzer agree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
af2c3e054f
commit
e2bfe3906a
@@ -1,9 +1,12 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Strata.SqlTools.Rules.Rule.Expression;
|
||||
|
||||
/// <summary>
|
||||
/// Provides implicit conversion operators and comparison operators for rule expressions.
|
||||
/// </summary>
|
||||
#pragma warning disable CS0660, CS0661
|
||||
[SuppressMessage("Major Code Smell", "S3875:\"operator==\" should not be overloaded on reference types", Justification = "Intentional DSL syntax: `expr1 == expr2` constructs a Comparison rule expression, not a bool. The existing CS0660/CS0661 pragma documents the deliberate omission of Equals/GetHashCode for the same reason.")]
|
||||
public partial class Expression
|
||||
#pragma warning restore CS0660, CS0661
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user