Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KeyNotFound exception in RemoveUnnecessaryInlineSuppressionsDiagn… #46048

Merged
merged 1 commit into from
Jul 16, 2020

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 CyrusNajmabadi, jmarolf and a team 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