/// <summary> /// Get the configured severity for a diagnostic analyzer from the <paramref name="analyzerConfigOptions" />. /// </summary> public static ReportDiagnostic GetDiagnosticSeverity(this AnalyzerConfigOptions analyzerConfigOptions, Project project, SyntaxTree tree, string diagnosticId, string diagnosticCategory) { return(analyzerConfigOptions.TryGetSeverityFromConfiguration(project, tree, diagnosticId, diagnosticCategory, out var reportSeverity) ? reportSeverity : ReportDiagnostic.Suppress); }