chore(sonar)!: mark Markdown generator classes as 'public static class' (S1118)
SonarQube Analysis / sonarqube (pull_request) Successful in 4m22s
SonarQube Analysis / sonarqube (pull_request) Successful in 4m22s
After the CA1822 cascade in #15 left every method on the eight Markdown generator classes static, the classes themselves were instantiable shells that consumers couldn't usefully `new`. This commit flips the `class` modifier to `static class` on all eight: - `Markdown.SqlServer.QueryBreakdownGenerator` - `Markdown.SqlServer.SqlStatementGenerator` - `Markdown.LinqToSql.QueryBreakdownGenerator` - `Markdown.LinqToSql.SqlStatementGenerator` - `Markdown.PostgreSql.QueryBreakdownGenerator` - `Markdown.PostgreSql.SqlStatementGenerator` - `Markdown.Snowflake.QueryBreakdownGenerator` - `Markdown.Snowflake.SqlStatementGenerator` Test fixtures drop the now-meaningless `_generator = new …()` field and `[SetUp]` (kept the existing Setup body where unrelated state was also initialized — `QueryMarkdownGenerationTests` and `LinqToSql.QueryBreakdownGeneratorTests`). BREAKING CHANGE: External NuGet consumers can no longer write `new Markdown.Snowflake.SqlStatementGenerator()` (or any of the other seven classes above) — the type is now a static container and may only be referenced by name, e.g. `Markdown.Snowflake.SqlStatementGenerator.GenerateSequenceDiagram(…)`. The call syntax for the static methods is unchanged. 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
54b9c7876f
commit
423108a7dc
@@ -8,7 +8,7 @@ namespace Strata.SqlTools.Markdown.SqlServer;
|
||||
/// Generates Mermaid diagram markdown from SQL QueryBreakdown objects.
|
||||
/// Creates flowchart visualizations showing the query structure and flow.
|
||||
/// </summary>
|
||||
public class QueryBreakdownGenerator
|
||||
public static class QueryBreakdownGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// Generates a Mermaid flowchart diagram from a QueryBreakdown.
|
||||
|
||||
Reference in New Issue
Block a user