提交 58263e68 编写于 作者: M Manish Vasani

Minor fix

上级 611ca93e
......@@ -337,6 +337,7 @@ private int RunCore(TextWriter consoleOutput, CancellationToken cancellationToke
EventHandler<AnalyzerExceptionDiagnosticArgs> analyzerExceptionDiagnosticsHandler = null;
if (!analyzers.IsDefaultOrEmpty)
{
analyzerExceptionDiagnostics = new ConcurrentSet<Diagnostic>();
analyzerExceptionDiagnosticsHandler = AnalyzerDriverHelper.RegisterAnalyzerExceptionDiagnosticHandler(analyzers, analyzerExceptionDiagnostics.Add);
var analyzerManager = new AnalyzerManager();
......@@ -448,8 +449,8 @@ private int RunCore(TextWriter consoleOutput, CancellationToken cancellationToke
if (analyzerDriver != null)
{
var analyzerDiagnostics = analyzerDriver.GetDiagnosticsAsync().Result;
AnalyzerDriverHelper.UnregisterAnalyzerExceptionDiagnosticHandler(analyzerExceptionDiagnosticsHandler);
var allAnalyzerDiagnostics = analyzerDiagnostics.AddRange(analyzerExceptionDiagnostics);
AnalyzerDriverHelper.UnregisterAnalyzerExceptionDiagnosticHandler(analyzerExceptionDiagnosticsHandler);
if (PrintErrors(allAnalyzerDiagnostics, consoleOutput))
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册