提交 f6ebf5bd 编写于 作者: H Heejae Chang

fixed option change

上级 15cac63b
......@@ -109,7 +109,7 @@ public IEnumerable<DiagnosticData> ConvertToLocalDiagnostics(Document targetDocu
// perf optimization. check whether we want to analyze this project or not.
if (!await FullAnalysisEnabledAsync(project, ignoreOption, cancellationToken).ConfigureAwait(false))
{
return new ProjectAnalysisData(project.Id, version, existingData.Result, ImmutableDictionary<DiagnosticAnalyzer, AnalysisResult>.Empty);
return new ProjectAnalysisData(project.Id, VersionStamp.Default, existingData.Result, ImmutableDictionary<DiagnosticAnalyzer, AnalysisResult>.Empty);
}
var result = await ComputeDiagnosticsAsync(analyzerDriverOpt, project, stateSets, existingData.Result, cancellationToken).ConfigureAwait(false);
......@@ -412,7 +412,7 @@ private static async Task<bool> FullAnalysisEnabledAsync(Project project, bool i
return await project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false);
}
if (!workspace.Options.GetOption(ServiceFeatureOnOffOptions.ClosedFileDiagnostic, language) ||
if (!ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(workspace, language) ||
!workspace.Options.GetOption(RuntimeOptions.FullSolutionAnalysis))
{
return false;
......
......@@ -224,7 +224,7 @@ public async Task MergeAsync(ActiveFileState state, Document document, bool forc
var semantic = state.GetAnalysisData(AnalysisKind.Semantic);
var project = document.Project;
var fullAnalysis = project.Solution.Workspace.Options.GetOption(ServiceFeatureOnOffOptions.ClosedFileDiagnostic, project.Language);
var fullAnalysis = ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(project.Solution.Workspace, project.Language);
// keep from build flag if full analysis is off
var fromBuild = fullAnalysis ? false : lastResult.FromBuild;
......
......@@ -224,7 +224,9 @@ private IEnumerable<StateSet> GetStateSetsForFullSolutionAnalysis(IEnumerable<St
// Get stateSets that should be run for full analysis
// if full analysis is off, remove state that is from build.
if (!project.Solution.Workspace.Options.GetOption(ServiceFeatureOnOffOptions.ClosedFileDiagnostic, project.Language))
// this will make sure diagnostics (converted from build to live) from build will never be cleared
// until next build.
if (!ServiceFeatureOnOffOptions.IsClosedFileDiagnosticsEnabled(project.Solution.Workspace, project.Language))
{
stateSets = stateSets.Where(s => !s.FromBuild(project.Id));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册