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
@@ -37,7 +37,7 @@ public class QueryBreakdownGenerator
/// <param name="queryBreakdown">The LINQ QueryBreakdown to visualize.</param>
/// <param name="title">Optional title for the diagram.</param>
/// <returns>A string containing the Mermaid flowchart showing method calls.</returns>
public string GenerateMethodChainDiagram(LinqQueryBreakdown queryBreakdown, string? title = null)
public static string GenerateMethodChainDiagram(LinqQueryBreakdown queryBreakdown, string? title = null)
{
var sb = new System.Text.StringBuilder();