Skip to content

Fix KeyNotFound exception in RemoveUnnecessaryInlineSuppressionsDiagn…#46048

Merged
mavasani merged 1 commit intodotnet:masterfrom
mavasani:FixIDE0079
Jul 16, 2020
Merged

Fix KeyNotFound exception in RemoveUnnecessaryInlineSuppressionsDiagn…#46048
mavasani merged 1 commit intodotnet:masterfrom
mavasani:FixIDE0079

Conversation

@mavasani
Copy link
Contributor

@mavasani mavasani commented Jul 16, 2020

…osticAnalyzer

Fixes #46047

#45765 enhanced this analyzer to support detecting unnecessary inline SuppressMessageAttribute suppressions. This led to a regression when processing idToPragmasMap for unhandled IDs, which is fixed by this change.

…osticAnalyzer

Fixes dotnet#46047

dotnet#45765 enhance this analyzer to support detecting unnecessary inline SuppressMessageAttribute suppressions. This led to a regression when processing idToPragmasMap for unhandled IDs, which is fixed by this change.
@mavasani mavasani added this to the 16.8.P1 milestone Jul 16, 2020
@mavasani mavasani requested review from a team, CyrusNajmabadi and jmarolf July 16, 2020 18:20
[Theory, CombinatorialData]
public async Task TestDoNotRemoveUnsupportedDiagnosticSuppression(bool disable)
[WorkItem(46047, "https://github.com/dotnet/roslyn/issues/46047")]
public async Task TestDoNotRemoveUnsupportedDiagnosticSuppression(bool disable, TestKind testKind)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exception was being hit for TestKind.SuppressMessageAttributes when there are no pragmas in input.

@mavasani
Copy link
Contributor Author

Thanks @sharwell

@mavasani mavasani merged commit 4a877e6 into dotnet:master Jul 16, 2020
@ghost ghost modified the milestones: 16.8.P1, Next Jul 16, 2020
@mavasani mavasani deleted the FixIDE0079 branch July 16, 2020 21:26
@JoeRobich JoeRobich modified the milestones: Next, 16.8.P1 Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening multiple split C# editors crashes VS

3 participants