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
@@ -177,7 +177,7 @@ public class QueryBreakdownGenerator
/// <summary>
/// Escapes text for Mermaid diagram labels to prevent syntax errors.
/// </summary>
private string EscapeMermaidText(string text)
private static string EscapeMermaidText(string text)
{
return text
.Replace("\"", "&quot;")
@@ -194,7 +194,7 @@ public class QueryBreakdownGenerator
/// <summary>
/// Truncates text to a maximum length and adds ellipsis if needed.
/// </summary>
private string TruncateText(string text, int maxLength)
private static string TruncateText(string text, int maxLength)
{
if (string.IsNullOrWhiteSpace(text) || text.Length <= maxLength)
{