private void Analyze(SyntaxNodeAnalysisContext context) { if (AllocationRules.IsIgnoredFile(context.Node.SyntaxTree.FilePath)) { return; } if (HasIgnoreAttribute(context)) { return; } var ids = SupportedDiagnostics.Select(x => x.Id).ToArray(); EnabledRules rules = AllocationRules.GetEnabledRules(ids); if (!rules.AnyEnabled) { return; } rules = HotPathAnalysis.GetEnabledRules(rules.All(), context); if (!rules.AnyEnabled) { return; } AnalyzeNode(context, rules); }
private void Analyze(SyntaxNodeAnalysisContext context) { if (AllocationRules.IsIgnoredFile(context.Node.SyntaxTree.FilePath)) { return; } if (context.ContainingSymbol.GetAttributes().Any(AllocationRules.IsIgnoredAttribute)) { return; } AnalyzeNode(context); }