Skip to content

Commit

Permalink
加入分析器发布跟踪
Browse files Browse the repository at this point in the history
  • Loading branch information
laolarou726 committed Oct 22, 2023
1 parent 5553941 commit 54021cd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
; Shipped analyzer releases
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
; Unshipped analyzer release
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|-------
Hive0001 | Hive | Error | AppMessageHandlerBinderGen
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class AppMessageHandlerBinderGen : ISourceGenerator
DiagnosticSeverity.Error, true);


private const string Tempalte = """
private const string Template = """

{0}

Expand Down Expand Up @@ -172,7 +172,7 @@ private static void GenerateUsingTemplate(GeneratorExecutionContext context,

var binderInvoke = string.Join(",\n", binderInvokeList);

var finalCode = string.Format(Tempalte, usingBuilder.ToString(), namespaceName, definedApplicationClassSymbol.Name, definedApplicationClassSymbol.ToDisplayString(), binderInvoke);
var finalCode = string.Format(Template, usingBuilder.ToString(), namespaceName, definedApplicationClassSymbol.Name, definedApplicationClassSymbol.ToDisplayString(), binderInvoke);

var newSourceText = CSharpSyntaxTree.ParseText(SourceText.From(finalCode, Encoding.UTF8)).GetRoot()
.NormalizeWhitespace().SyntaxTree.GetText();
Expand Down

0 comments on commit 54021cd

Please sign in to comment.