From 8eb8ef3a305bec80d2c62ff2496ddcda8677c9fe Mon Sep 17 00:00:00 2001 From: Cristian Ambrosini Date: Tue, 7 May 2024 14:01:13 +0200 Subject: [PATCH] Remove CheckAndReturnRazorSourceGeneratorPath --- .../Common/SourceGeneratorProvider.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/analyzers/tests/SonarAnalyzer.TestFramework/Common/SourceGeneratorProvider.cs b/analyzers/tests/SonarAnalyzer.TestFramework/Common/SourceGeneratorProvider.cs index 1835ea6a441..ebabc7a4985 100644 --- a/analyzers/tests/SonarAnalyzer.TestFramework/Common/SourceGeneratorProvider.cs +++ b/analyzers/tests/SonarAnalyzer.TestFramework/Common/SourceGeneratorProvider.cs @@ -30,12 +30,9 @@ public static class SourceGeneratorProvider public static AnalyzerFileReference[] SourceGenerators { get; } = [ - new(CheckAndReturnRazorSourceGeneratorPath(), new AssemblyLoader()) + new(RazorSourceGeneratorPath, new AssemblyLoader()) ]; - public static string CheckAndReturnRazorSourceGeneratorPath() => - File.Exists(RazorSourceGeneratorPath) ? RazorSourceGeneratorPath : throw new FileNotFoundException($"Razor sourcegenerator not found: {RazorSourceGeneratorPath}"); - public static string LatestSdkFolder() { var objectAssembly = typeof(object).Assembly;