Skip to content

Fix OperationBlockStart analyzer callbacks#41403

Merged
mavasani merged 1 commit intodotnet:masterfrom
mavasani:Issue41402
Feb 6, 2020
Merged

Fix OperationBlockStart analyzer callbacks#41403
mavasani merged 1 commit intodotnet:masterfrom
mavasani:Issue41402

Conversation

@mavasani
Copy link
Copy Markdown
Contributor

@mavasani mavasani commented Feb 4, 2020

Fixes #41402

When performing analyzer execution from IDE for open files using CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync API, we were not properly reseting the analyzer state after executing operation actions. This caused any subsequent operation block registrations by the same analyzer to be skipped in the analysis callbacks. This issue does not affect command line analyzer execution as we always run the analyzers on the entire compilation, and hence do not perform any partial state tracking.

Verified that the added unit test fails prior to the fix.

Fixes dotnet#41402

When performing analyzer execution from IDE for open files using [CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync](http://sourceroslyn.io/#q=CompilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync) API, we were not properly reseting the analyzer state after executing operation actions. This caused any subsequent operation block registrations by the same analyzer to be skipped in the analysis callbacks. This issue does not affect command line analyzer execution as we always run the analyzers on the entire compilation, and hence do not perform any partial state tracking.
Verified that the added unit test fails prior to the fix.
@mavasani mavasani added this to the 16.6.P1 milestone Feb 4, 2020
@mavasani mavasani requested a review from a team February 4, 2020 22:20
@mavasani
Copy link
Copy Markdown
Contributor Author

mavasani commented Feb 6, 2020

@dotnet/roslyn-compiler for reviews.

@mavasani mavasani merged commit aeb4789 into dotnet:master Feb 6, 2020
@mavasani mavasani deleted the Issue41402 branch February 6, 2020 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Operation block start callback not made in IDE analyzer execution

4 participants