提交 1a0ba472 编写于 作者: H Heejae Chang 提交者: GitHub

Merge pull request #14631 from heejaechang/fixNullException

fixed 2 issue where IDE analyzer throws null exception and host analy…
......@@ -105,6 +105,14 @@ public void ClearAnalyzerDiagnostics(ImmutableArray<DiagnosticAnalyzer> analyzer
}
}
public void ClearAnalyzerDiagnostics(ProjectId projectId)
{
foreach (var analyzer in _analyzerHostDiagnosticsMap.Keys)
{
ClearAnalyzerDiagnostics(analyzer, projectId);
}
}
private void ClearAnalyzerDiagnostics(DiagnosticAnalyzer analyzer, ProjectId projectId)
{
ImmutableHashSet<DiagnosticData> existing;
......
......@@ -98,6 +98,8 @@ public void ClearAllDiagnosticsForProject(ProjectId projectId)
RaiseDiagnosticsRemovedForProject(projectId, key);
}
}
ClearAnalyzerDiagnostics(projectId);
}
public void ClearDiagnosticsForProject(ProjectId projectId, object key)
......
......@@ -59,7 +59,7 @@ public DiagnosticComputer(Project project)
// TODO: can we support analyzerExceptionFilter in remote host?
// right now, host doesn't support watson, we might try to use new NonFatal watson API?
var analyzerOptions = new CompilationWithAnalyzersOptions(
options: _project.AnalyzerOptions,
options: new WorkspaceAnalyzerOptions(_project.AnalyzerOptions, _project.Solution.Workspace),
onAnalyzerException: OnAnalyzerException,
analyzerExceptionFilter: null,
concurrentAnalysis: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册