Skip to content

Commit

Permalink
docs: explain why the analyzer should run on generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
earloc committed Oct 26, 2024
1 parent b41d479 commit 46da57c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/TypealizeR.Analyzers/UseIndexerAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public override void Initialize(AnalysisContext context)
{
context = context ?? throw new ArgumentNullException(nameof(context));

// enable analysis of generated code, so the analyzer also sees f.e. razor-files: https://github.com/dotnet/razor/issues/7250
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
context.EnableConcurrentExecution();

Expand Down

0 comments on commit 46da57c

Please sign in to comment.