From e1cdcd77a4236040fe83d3154fccbd5a9fdd8979 Mon Sep 17 00:00:00 2001 From: Thom Lamb Date: Tue, 26 May 2026 09:26:35 -0500 Subject: [PATCH] chore(sonar): collapse trivial backing-field properties to auto-properties (S2292) - WithClause.RecursiveQuery and WithClause.ColumnList had get/set bodies that only forwarded to private backing fields. Convert both to auto-properties and remove the now-orphaned _recursiveQuery / _columnList fields. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Classes/WithClause.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Strata.SqlTools.SqlBreakdown/Classes/WithClause.cs b/src/Strata.SqlTools.SqlBreakdown/Classes/WithClause.cs index 5a10672..829c833 100644 --- a/src/Strata.SqlTools.SqlBreakdown/Classes/WithClause.cs +++ b/src/Strata.SqlTools.SqlBreakdown/Classes/WithClause.cs @@ -29,8 +29,6 @@ public class WithClause : SqlClause, IWithClause { private SqlClauses? _sql; private IQueryBreakdown? _query; - private IQueryBreakdown? _recursiveQuery; - private List? _columnList; /// /// Gets or sets the table name for the CTE. @@ -115,11 +113,7 @@ public class WithClause : SqlClause, IWithClause /// Example recursive scenario: traversing an organizational hierarchy where employees reference their managers. /// /// - public IQueryBreakdown? RecursiveQuery - { - get => _recursiveQuery; - set => _recursiveQuery = value; - } + public IQueryBreakdown? RecursiveQuery { get; set; } /// /// Gets or sets the explicit column list for the CTE. @@ -135,11 +129,7 @@ public class WithClause : SqlClause, IWithClause /// /// The number of column names must match the number of columns in the SELECT clause. /// - public List? ColumnList - { - get => _columnList; - set => _columnList = value; - } + public List? ColumnList { get; set; } /// /// Initializes a new instance of the class.