Skip to content

Add analyzer/fixer for unnecessary global SuppressMessageAttributes with invalid 'Scope' and/or 'Target'#44287

Merged
6 commits merged intodotnet:masterfrom
mavasani:Issue44176
May 18, 2020
Merged

Add analyzer/fixer for unnecessary global SuppressMessageAttributes with invalid 'Scope' and/or 'Target'#44287
6 commits merged intodotnet:masterfrom
mavasani:Issue44176

Conversation

@mavasani
Copy link
Contributor

Suppressions are greyed out in the IDE as they are redundant and can be removed.
Closes #44176

NOTE: I have moved the xlf file changes to a separate commit to help with review.

image

mavasani added 2 commits May 15, 2020 08:07
…Scope and/or Target

These suppressions are redundant and can be removed.
Closes dotnet#44176
@mavasani mavasani added this to the 16.7.P2 milestone May 15, 2020
@mavasani mavasani requested review from a team, CyrusNajmabadi and sharwell May 15, 2020 15:46
@mavasani mavasani requested a review from a team as a code owner May 15, 2020 15:46
return true;
}

internal enum TargetScope
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dotnet/roslyn-compiler Only compiler change in the PR is moving this nested internal enum to a separate file, so it can be used by the added analyzer to detect invalid SuppressMessageAttribute target/scope. This new file is linked into the IDE analyzer layer.

Copy link
Contributor

@cston cston left a comment

Choose a reason for hiding this comment

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

Compiler change LGTM.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Auto-approval

This pull request was closed.
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.

Analyzer to report invalid "Target" and "Scope" strings for global SuppressMessage attributes

4 participants