From d9ed3665edcff4292927d62a8eb6b33c23a46638 Mon Sep 17 00:00:00 2001 From: Peter Morris Date: Sun, 22 Dec 2024 22:13:05 +0000 Subject: [PATCH] Attempt to analyze razor files too. --- .../Lib/Fluxor.Blazor.Web.Analyzers/CallBaseOnInitialized.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Lib/Fluxor.Blazor.Web.Analyzers/CallBaseOnInitialized.cs b/Source/Lib/Fluxor.Blazor.Web.Analyzers/CallBaseOnInitialized.cs index 23a0c672..3d58966b 100644 --- a/Source/Lib/Fluxor.Blazor.Web.Analyzers/CallBaseOnInitialized.cs +++ b/Source/Lib/Fluxor.Blazor.Web.Analyzers/CallBaseOnInitialized.cs @@ -21,13 +21,14 @@ public sealed class CallBaseOnInitialized : DiagnosticAnalyzer public override void Initialize(AnalysisContext context) { - context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); + context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics); context.EnableConcurrentExecution(); context.RegisterSyntaxNodeAction( action: AnalyzeMethod, syntaxKinds: SyntaxKind.MethodDeclaration); } + private static bool IsFluxorComponentBase(INamedTypeSymbol? symbol) => symbol is not null && (