chore(sonar)!: mark instance-data-free members static (CA1822)

Applied via `dotnet format analyzers --diagnostics CA1822 --severity info`.
12 files touched. The fixer also updated internal callers in tests to use
the type-name form (e.g. `gen.Method(x)` -> `Generator.Method(x)`); build
and full test suite remain green.

BREAKING CHANGE: two public methods become static and therefore can no
longer be invoked through an instance reference by external consumers:
- Strata.SqlTools.Markdown.LinqToSql.QueryBreakdownGenerator.GenerateMethodChainDiagram
- Strata.SqlTools.Markdown.LinqToSql.SqlStatementGenerator.GenerateLinqPipelineDiagram

Both are stateless utility methods on Generator classes — the static form
is the correct shape; the only callers in this repo already used the
type-name form. External code should change `gen.GenerateMethodChainDiagram(...)`
to `QueryBreakdownGenerator.GenerateMethodChainDiagram(...)`.

All other CA1822 hits in this commit are on private/protected members
(no public-surface impact).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Thom Lamb
2026-05-26 15:41:46 -05:00
co-authored by Claude Opus 4.7
parent 8b7fc1a327
commit 84b06557e5
12 changed files with 62 additions and 62 deletions
@@ -21,7 +21,7 @@ public class SqlStatementGeneratorTests
var query = new LinqQueryBreakdown("*", "Users");
// Act
var result = _generator.GenerateLinqPipelineDiagram(query, "User Query Pipeline");
var result = SqlStatementGenerator.GenerateLinqPipelineDiagram(query, "User Query Pipeline");
// Assert
Assert.That(result, Does.Contain("```mermaid"));
@@ -42,7 +42,7 @@ public class SqlStatementGeneratorTests
query.AddWhereClause("Age > 21");
// Act
var result = _generator.GenerateLinqPipelineDiagram(query);
var result = SqlStatementGenerator.GenerateLinqPipelineDiagram(query);
// Assert
Assert.That(result, Does.Contain("Where Predicate"));
@@ -57,7 +57,7 @@ public class SqlStatementGeneratorTests
var query = new LinqQueryBreakdown("Id, Name, Email", "Users");
// Act
var result = _generator.GenerateLinqPipelineDiagram(query);
var result = SqlStatementGenerator.GenerateLinqPipelineDiagram(query);
// Assert
Assert.That(result, Does.Contain("Select Projection"));
@@ -72,7 +72,7 @@ public class SqlStatementGeneratorTests
var query = new LinqQueryBreakdown("*", "Users");
// Act
var result = _generator.GenerateLinqPipelineDiagram(query, null);
var result = SqlStatementGenerator.GenerateLinqPipelineDiagram(query, null);
// Assert
Assert.That(result, Does.Not.Contain("###"));