From e31682571b7367ddb2a2b50ab2dafd2801faf9c0 Mon Sep 17 00:00:00 2001 From: Heejae Chang Date: Thu, 8 Dec 2016 18:04:45 -0800 Subject: [PATCH] clean up code that no longer needed --- .../Diagnostics/DiagnosticServiceTests.vb | 4 +- ...sticAnalyzerService_IncrementalAnalyzer.cs | 184 +----------------- .../EngineV2/DiagnosticIncrementalAnalyzer.cs | 12 ++ ...ncrementalAnalyzer_BuildSynchronization.cs | 4 +- .../InternalDiagnosticsOptionsProvider.cs | 3 - .../SolutionCrawler/SolutionCrawlerLogger.cs | 4 +- ...oordinator.IncrementalAnalyzerProcessor.cs | 12 -- .../SolutionCrawler/WorkCoordinator.cs | 6 - .../ExternalErrorDiagnosticUpdateSource.cs | 20 +- .../Diagnostics/InternalDiagnosticsOptions.cs | 9 - 10 files changed, 23 insertions(+), 235 deletions(-) diff --git a/src/EditorFeatures/Test2/Diagnostics/DiagnosticServiceTests.vb b/src/EditorFeatures/Test2/Diagnostics/DiagnosticServiceTests.vb index b2b5d793f11..7c2a02448d0 100644 --- a/src/EditorFeatures/Test2/Diagnostics/DiagnosticServiceTests.vb +++ b/src/EditorFeatures/Test2/Diagnostics/DiagnosticServiceTests.vb @@ -1939,9 +1939,9 @@ class MyClass ' Get cached project diagnostics. Dim diagnostics = diagnosticService.GetCachedDiagnosticsAsync(workspace, project.Id).WaitAndGetResult(CancellationToken.None) - ' different behavior between v1 and v2. in v2. in v2, solution crawler never creates non-local hidden diagnostics. + ' in v2, solution crawler never creates non-local hidden diagnostics. ' v2 still creates those for LB and explicit queries such as FixAll. - Dim expectedCount = If(workspace.Options.GetOption(InternalDiagnosticsOptions.UseDiagnosticEngineV2), 0, 1) + Dim expectedCount = 0 Assert.Equal(expectedCount, diagnostics.Count()) ' Get diagnostics explicitly diff --git a/src/Features/Core/Portable/Diagnostics/DiagnosticAnalyzerService_IncrementalAnalyzer.cs b/src/Features/Core/Portable/Diagnostics/DiagnosticAnalyzerService_IncrementalAnalyzer.cs index 744465bfcf3..0a0a7e76f12 100644 --- a/src/Features/Core/Portable/Diagnostics/DiagnosticAnalyzerService_IncrementalAnalyzer.cs +++ b/src/Features/Core/Portable/Diagnostics/DiagnosticAnalyzerService_IncrementalAnalyzer.cs @@ -1,23 +1,16 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System.Collections.Generic; -using System.Collections.Immutable; using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.CodeAnalysis.CodeStyle; +using Microsoft.CodeAnalysis.Diagnostics.EngineV2; using Microsoft.CodeAnalysis.Internal.Log; -using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Options; -using Microsoft.CodeAnalysis.Simplification; using Microsoft.CodeAnalysis.SolutionCrawler; -using Microsoft.CodeAnalysis.Text; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.Diagnostics { [ExportIncrementalAnalyzerProvider( - highPriorityForActiveFile: true, name: WellKnownSolutionCrawlerAnalyzers.Diagnostic, + highPriorityForActiveFile: true, name: WellKnownSolutionCrawlerAnalyzers.Diagnostic, workspaceKinds: new string[] { WorkspaceKind.Host, WorkspaceKind.Interactive, WorkspaceKind.AnyCodeRoslynWorkspace })] internal partial class DiagnosticAnalyzerService : IIncrementalAnalyzerProvider { @@ -58,182 +51,13 @@ private BaseDiagnosticIncrementalAnalyzer CreateIncrementalAnalyzerCallback(Work { // subscribe to active context changed event for new workspace workspace.DocumentActiveContextChanged += OnDocumentActiveContextChanged; - return new IncrementalAnalyzerDelegatee(this, workspace, _hostAnalyzerManager, _hostDiagnosticUpdateSource); + + return new DiagnosticIncrementalAnalyzer(this, LogAggregator.GetNextId(), workspace, _hostAnalyzerManager, _hostDiagnosticUpdateSource); } private void OnDocumentActiveContextChanged(object sender, DocumentActiveContextChangedEventArgs e) { Reanalyze(e.Solution.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(e.NewActiveContextDocumentId), highPriority: true); } - - // internal for testing - internal class IncrementalAnalyzerDelegatee : BaseDiagnosticIncrementalAnalyzer - { - // v2 diagnostic engine - for now v1 - private readonly EngineV2.DiagnosticIncrementalAnalyzer _engineV2; - - public IncrementalAnalyzerDelegatee(DiagnosticAnalyzerService owner, Workspace workspace, HostAnalyzerManager hostAnalyzerManager, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource) - : base(owner, workspace, hostAnalyzerManager, hostDiagnosticUpdateSource) - { - var v2CorrelationId = LogAggregator.GetNextId(); - _engineV2 = new EngineV2.DiagnosticIncrementalAnalyzer(owner, v2CorrelationId, workspace, hostAnalyzerManager, hostDiagnosticUpdateSource); - } - - #region IIncrementalAnalyzer - public override Task AnalyzeSyntaxAsync(Document document, InvocationReasons reasons, CancellationToken cancellationToken) - { - return Analyzer.AnalyzeSyntaxAsync(document, reasons, cancellationToken); - } - - public override Task AnalyzeDocumentAsync(Document document, SyntaxNode bodyOpt, InvocationReasons reasons, CancellationToken cancellationToken) - { - return Analyzer.AnalyzeDocumentAsync(document, bodyOpt, reasons, cancellationToken); - } - - public override Task AnalyzeProjectAsync(Project project, bool semanticsChanged, InvocationReasons reasons, CancellationToken cancellationToken) - { - return Analyzer.AnalyzeProjectAsync(project, semanticsChanged, reasons, cancellationToken); - } - - public override Task DocumentOpenAsync(Document document, CancellationToken cancellationToken) - { - return Analyzer.DocumentOpenAsync(document, cancellationToken); - } - - public override Task DocumentCloseAsync(Document document, CancellationToken cancellationToken) - { - return Analyzer.DocumentCloseAsync(document, cancellationToken); - } - - public override Task DocumentResetAsync(Document document, CancellationToken cancellationToken) - { - return Analyzer.DocumentResetAsync(document, cancellationToken); - } - - public override Task NewSolutionSnapshotAsync(Solution solution, CancellationToken cancellationToken) - { - return Analyzer.NewSolutionSnapshotAsync(solution, cancellationToken); - } - - public override void RemoveDocument(DocumentId documentId) - { - Analyzer.RemoveDocument(documentId); - } - - public override void RemoveProject(ProjectId projectId) - { - Analyzer.RemoveProject(projectId); - } - - public override bool NeedsReanalysisOnOptionChanged(object sender, OptionChangedEventArgs e) - { - return e.Option.Feature == nameof(SimplificationOptions) || - e.Option.Feature == nameof(CodeStyleOptions) || - e.Option == ServiceFeatureOnOffOptions.ClosedFileDiagnostic || - e.Option == RuntimeOptions.FullSolutionAnalysis || - e.Option == InternalDiagnosticsOptions.UseDiagnosticEngineV2 || - Analyzer.NeedsReanalysisOnOptionChanged(sender, e); - } - #endregion - - #region delegating methods from diagnostic analyzer service to each implementation of the engine - public override Task> GetCachedDiagnosticsAsync(Solution solution, ProjectId projectId = null, DocumentId documentId = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) - { - return Analyzer.GetCachedDiagnosticsAsync(solution, projectId, documentId, includeSuppressedDiagnostics, cancellationToken); - } - - public override Task> GetSpecificCachedDiagnosticsAsync(Solution solution, object id, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) - { - return Analyzer.GetSpecificCachedDiagnosticsAsync(solution, id, includeSuppressedDiagnostics, cancellationToken); - } - - public override Task> GetDiagnosticsAsync(Solution solution, ProjectId projectId = null, DocumentId documentId = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) - { - return Analyzer.GetDiagnosticsAsync(solution, projectId, documentId, includeSuppressedDiagnostics, cancellationToken); - } - - public override Task> GetSpecificDiagnosticsAsync(Solution solution, object id, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) - { - return Analyzer.GetSpecificDiagnosticsAsync(solution, id, includeSuppressedDiagnostics, cancellationToken); - } - - public override Task> GetDiagnosticsForIdsAsync(Solution solution, ProjectId projectId = null, DocumentId documentId = null, ImmutableHashSet diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) - { - return Analyzer.GetDiagnosticsForIdsAsync(solution, projectId, documentId, diagnosticIds, includeSuppressedDiagnostics, cancellationToken); - } - - public override Task> GetProjectDiagnosticsForIdsAsync(Solution solution, ProjectId projectId = null, ImmutableHashSet diagnosticIds = null, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) - { - return Analyzer.GetProjectDiagnosticsForIdsAsync(solution, projectId, diagnosticIds, includeSuppressedDiagnostics, cancellationToken); - } - - public override Task TryAppendDiagnosticsForSpanAsync(Document document, TextSpan range, List diagnostics, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) - { - return Analyzer.TryAppendDiagnosticsForSpanAsync(document, range, diagnostics, includeSuppressedDiagnostics, cancellationToken); - } - - public override Task> GetDiagnosticsForSpanAsync(Document document, TextSpan range, bool includeSuppressedDiagnostics = false, CancellationToken cancellationToken = default(CancellationToken)) - { - return Analyzer.GetDiagnosticsForSpanAsync(document, range, includeSuppressedDiagnostics, cancellationToken); - } - - public override bool ContainsDiagnostics(Workspace workspace, ProjectId projectId) - { - return Analyzer.ContainsDiagnostics(workspace, projectId); - } - #endregion - - #region build synchronization - public override Task SynchronizeWithBuildAsync(Workspace workspace, ImmutableDictionary> diagnostics) - { - return Analyzer.SynchronizeWithBuildAsync(workspace, diagnostics); - } - #endregion - - public override void Shutdown() - { - Analyzer.Shutdown(); - } - - public override void LogAnalyzerCountSummary() - { - Analyzer.LogAnalyzerCountSummary(); - } - - public void TurnOff(bool useV2) - { - // Uncomment the below when we add a v3 engine. - - //var turnedOffAnalyzer = GetAnalyzer(!useV2); - - //foreach (var project in Workspace.CurrentSolution.Projects) - //{ - // foreach (var document in project.Documents) - // { - // turnedOffAnalyzer.RemoveDocument(document.Id); - // } - - // turnedOffAnalyzer.RemoveProject(project.Id); - //} - } - - // internal for testing - internal BaseDiagnosticIncrementalAnalyzer Analyzer - { - get - { - var option = Workspace.Options.GetOption(InternalDiagnosticsOptions.UseDiagnosticEngineV2); - return GetAnalyzer(option); - } - } - - private BaseDiagnosticIncrementalAnalyzer GetAnalyzer(bool useV2) - { - // v1 engine has been removed, always use v2 engine (until v3 engine is added). - //return useV2 ? (BaseDiagnosticIncrementalAnalyzer)_engineV2 : _engineV1; - - return (BaseDiagnosticIncrementalAnalyzer)_engineV2; - } - } } } diff --git a/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.cs b/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.cs index a38060a0af5..2d8bfa1d97b 100644 --- a/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.cs +++ b/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.cs @@ -6,8 +6,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using Microsoft.CodeAnalysis.CodeStyle; using Microsoft.CodeAnalysis.Diagnostics.Log; +using Microsoft.CodeAnalysis.Options; using Microsoft.CodeAnalysis.Shared.Extensions; +using Microsoft.CodeAnalysis.Shared.Options; +using Microsoft.CodeAnalysis.Simplification; using Microsoft.CodeAnalysis.Workspaces.Diagnostics; using Roslyn.Utilities; @@ -56,6 +60,14 @@ public override bool ContainsDiagnostics(Workspace workspace, ProjectId projectI return false; } + public override bool NeedsReanalysisOnOptionChanged(object sender, OptionChangedEventArgs e) + { + return e.Option.Feature == nameof(SimplificationOptions) || + e.Option.Feature == nameof(CodeStyleOptions) || + e.Option == ServiceFeatureOnOffOptions.ClosedFileDiagnostic || + e.Option == RuntimeOptions.FullSolutionAnalysis; + } + private bool SupportAnalysisKind(DiagnosticAnalyzer analyzer, string language, AnalysisKind kind) { // compiler diagnostic analyzer always support all kinds diff --git a/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer_BuildSynchronization.cs b/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer_BuildSynchronization.cs index fa8424b0f9d..bf7b059c1e2 100644 --- a/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer_BuildSynchronization.cs +++ b/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer_BuildSynchronization.cs @@ -111,12 +111,12 @@ private ImmutableArray GetDiagnostics(DiagnosticAnalysisResult r private bool PreferBuildErrors(Workspace workspace) { - return workspace.Options.GetOption(InternalDiagnosticsOptions.BuildErrorIsTheGod) || workspace.Options.GetOption(InternalDiagnosticsOptions.PreferBuildErrorsOverLiveErrors); + return workspace.Options.GetOption(InternalDiagnosticsOptions.PreferBuildErrorsOverLiveErrors); } private bool PreferLiveErrorsOnOpenedFiles(Workspace workspace) { - return !workspace.Options.GetOption(InternalDiagnosticsOptions.BuildErrorIsTheGod) && workspace.Options.GetOption(InternalDiagnosticsOptions.PreferLiveErrorsOnOpenedFiles); + return workspace.Options.GetOption(InternalDiagnosticsOptions.PreferLiveErrorsOnOpenedFiles); } private ImmutableArray MergeDiagnostics(ImmutableArray newDiagnostics, ImmutableArray existingDiagnostics) diff --git a/src/Features/Core/Portable/Diagnostics/InternalDiagnosticsOptionsProvider.cs b/src/Features/Core/Portable/Diagnostics/InternalDiagnosticsOptionsProvider.cs index 39108088ddc..459d4d5d841 100644 --- a/src/Features/Core/Portable/Diagnostics/InternalDiagnosticsOptionsProvider.cs +++ b/src/Features/Core/Portable/Diagnostics/InternalDiagnosticsOptionsProvider.cs @@ -12,11 +12,8 @@ internal class InternalDiagnosticsOptionsProvider : IOptionProvider { public ImmutableArray Options { get; } = ImmutableArray.Create( InternalDiagnosticsOptions.BlueSquiggleForBuildDiagnostic, - InternalDiagnosticsOptions.UseDiagnosticEngineV2, InternalDiagnosticsOptions.CompilationEndCodeFix, InternalDiagnosticsOptions.UseCompilationEndCodeFixHeuristic, - InternalDiagnosticsOptions.BuildErrorIsTheGod, - InternalDiagnosticsOptions.ClearLiveErrorsForProjectBuilt, InternalDiagnosticsOptions.PreferLiveErrorsOnOpenedFiles, InternalDiagnosticsOptions.PreferBuildErrorsOverLiveErrors); } diff --git a/src/Features/Core/Portable/SolutionCrawler/SolutionCrawlerLogger.cs b/src/Features/Core/Portable/SolutionCrawler/SolutionCrawlerLogger.cs index fe004aae13d..c363b60cd59 100644 --- a/src/Features/Core/Portable/SolutionCrawler/SolutionCrawlerLogger.cs +++ b/src/Features/Core/Portable/SolutionCrawler/SolutionCrawlerLogger.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; -using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Diagnostics.EngineV2; using Microsoft.CodeAnalysis.Internal.Log; using Roslyn.Utilities; @@ -250,7 +250,7 @@ public static void LogIncrementalAnalyzerProcessorStatistics(int correlationId, foreach (var analyzer in analyzers) { - var diagIncrementalAnalyzer = analyzer as DiagnosticAnalyzerService.IncrementalAnalyzerDelegatee; + var diagIncrementalAnalyzer = analyzer as DiagnosticIncrementalAnalyzer; if (diagIncrementalAnalyzer != null) { diagIncrementalAnalyzer.LogAnalyzerCountSummary(); diff --git a/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.IncrementalAnalyzerProcessor.cs b/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.IncrementalAnalyzerProcessor.cs index 169428162d5..e2d14304ff7 100644 --- a/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.IncrementalAnalyzerProcessor.cs +++ b/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.IncrementalAnalyzerProcessor.cs @@ -111,18 +111,6 @@ public void Shutdown() _lowPriorityProcessor.Shutdown(); } - // TODO: delete this once prototyping is done - public void ChangeDiagnosticsEngine(bool useV2Engine) - { - var diagnosticAnalyzer = Analyzers.FirstOrDefault(a => a is BaseDiagnosticIncrementalAnalyzer) as DiagnosticAnalyzerService.IncrementalAnalyzerDelegatee; - if (diagnosticAnalyzer == null) - { - return; - } - - diagnosticAnalyzer.TurnOff(useV2Engine); - } - public ImmutableArray Analyzers => _normalPriorityProcessor.Analyzers; private Solution CurrentSolution => _registration.CurrentSolution; diff --git a/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs b/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs index 67b11932951..629a069d5ec 100644 --- a/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs +++ b/src/Features/Core/Portable/SolutionCrawler/WorkCoordinator.cs @@ -149,12 +149,6 @@ private void OnOptionChanged(object sender, OptionChangedEventArgs e) return; } - // Changing the UseV2Engine option is a no-op as we have a single engine now. - if (e.Option == Diagnostics.InternalDiagnosticsOptions.UseDiagnosticEngineV2) - { - _documentAndProjectWorkerProcessor.ChangeDiagnosticsEngine((bool)e.Value); - } - ReanalyzeOnOptionChange(sender, e); } diff --git a/src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs b/src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs index 31b8767ed03..00c67861e94 100644 --- a/src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs +++ b/src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs @@ -206,7 +206,7 @@ internal void OnSolutionBuild(object sender, UIContextChangedEventArgs e) var diagnosticService = _diagnosticService as DiagnosticAnalyzerService; if (diagnosticService != null) { - await CleanupAllLiveErrorsIfNeededAsync(diagnosticService, inprogressState.Solution, inprogressState).ConfigureAwait(false); + await CleanupAllLiveErrors(diagnosticService, inprogressState.GetProjectsWithoutErrors(inprogressState.Solution)).ConfigureAwait(false); await SyncBuildErrorsAndReportAsync(diagnosticService, inprogressState.Solution, inprogressState.GetLiveDiagnosticsPerProject(liveDiagnosticChecker)).ConfigureAwait(false); } @@ -215,24 +215,6 @@ internal void OnSolutionBuild(object sender, UIContextChangedEventArgs e) }).CompletesAsyncOperation(asyncToken); } - private async System.Threading.Tasks.Task CleanupAllLiveErrorsIfNeededAsync(DiagnosticAnalyzerService diagnosticService, Solution solution, InprogressState state) - { - if (_workspace.Options.GetOption(InternalDiagnosticsOptions.BuildErrorIsTheGod)) - { - await CleanupAllLiveErrors(diagnosticService, solution.ProjectIds).ConfigureAwait(false); - return; - } - - if (_workspace.Options.GetOption(InternalDiagnosticsOptions.ClearLiveErrorsForProjectBuilt)) - { - await CleanupAllLiveErrors(diagnosticService, state.GetProjectsBuilt(solution)).ConfigureAwait(false); - return; - } - - await CleanupAllLiveErrors(diagnosticService, state.GetProjectsWithoutErrors(solution)).ConfigureAwait(false); - return; - } - private System.Threading.Tasks.Task CleanupAllLiveErrors(DiagnosticAnalyzerService diagnosticService, IEnumerable projects) { var map = projects.ToImmutableDictionary(p => p, _ => ImmutableArray.Empty); diff --git a/src/Workspaces/Core/Portable/Diagnostics/InternalDiagnosticsOptions.cs b/src/Workspaces/Core/Portable/Diagnostics/InternalDiagnosticsOptions.cs index 53fdb60814d..57a40cfd248 100644 --- a/src/Workspaces/Core/Portable/Diagnostics/InternalDiagnosticsOptions.cs +++ b/src/Workspaces/Core/Portable/Diagnostics/InternalDiagnosticsOptions.cs @@ -11,21 +11,12 @@ internal static class InternalDiagnosticsOptions public static readonly Option BlueSquiggleForBuildDiagnostic = new Option(nameof(InternalDiagnosticsOptions), "Blue Squiggle For Build Diagnostic", defaultValue: false, storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + "Blue Squiggle For Build Diagnostic")); - public static readonly Option UseDiagnosticEngineV2 = new Option(nameof(InternalDiagnosticsOptions), "Use Diagnostic Engine V2", defaultValue: true, - storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + "Use Diagnostic Engine V2")); - public static readonly Option CompilationEndCodeFix = new Option(nameof(InternalDiagnosticsOptions), "Enable Compilation End Code Fix", defaultValue: true, storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + "Enable Compilation End Code Fix")); public static readonly Option UseCompilationEndCodeFixHeuristic = new Option(nameof(InternalDiagnosticsOptions), "Enable Compilation End Code Fix With Heuristic", defaultValue: true, storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + "Enable Compilation End Code Fix With Heuristic")); - public static readonly Option BuildErrorIsTheGod = new Option(nameof(InternalDiagnosticsOptions), "Make build errors to take over everything", defaultValue: false, - storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + "Make build errors to take over everything")); - - public static readonly Option ClearLiveErrorsForProjectBuilt = new Option(nameof(InternalDiagnosticsOptions), "Clear all live errors of projects that got built", defaultValue: false, - storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + "Clear all live errors of projects that got built")); - public static readonly Option PreferLiveErrorsOnOpenedFiles = new Option(nameof(InternalDiagnosticsOptions), "Live errors will be preferred over errors from build on opened files from same analyzer", defaultValue: true, storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + "Live errors will be preferred over errors from build on opened files from same analyzer")); -- GitLab