chore(sonar): mark private helpers static (CA1822)
Two private methods that don't touch instance state get the `static` keyword: - `LinqExpressionVisitor.ExtractMemberName` - `Markdown.Expressions.ExpressionGenerator.GenerateMermaidDiagram(Expression)` Both have only intra-class callers, so this is a non-breaking change — the call sites continue to work unchanged under C# method-resolution. 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
2c23ba4a88
commit
3c602a4625
@@ -303,7 +303,7 @@ public class LinqExpressionVisitor : ExpressionVisitor
|
|||||||
return string.IsNullOrEmpty(name) ? "*" : name;
|
return string.IsNullOrEmpty(name) ? "*" : name;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string ExtractMemberName(Expression expression)
|
private static string ExtractMemberName(Expression expression)
|
||||||
{
|
{
|
||||||
if (expression is MemberExpression member)
|
if (expression is MemberExpression member)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public class ExpressionGenerator : IVisitor<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Generates a Mermaid tree diagram from an Expression tree.
|
/// Generates a Mermaid tree diagram from an Expression tree.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private string GenerateMermaidDiagram(Expression expression)
|
private static string GenerateMermaidDiagram(Expression expression)
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.AppendLine("```mermaid");
|
sb.AppendLine("```mermaid");
|
||||||
|
|||||||
Reference in New Issue
Block a user