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

Analyzer complains about its own fix #7554

Open
SetTrend opened this issue Jan 31, 2025 · 1 comment
Open

Analyzer complains about its own fix #7554

SetTrend opened this issue Jan 31, 2025 · 1 comment

Comments

@SetTrend
Copy link

SetTrend commented Jan 31, 2025

Analyzer

Diagnostic ID: CA2263: Prefer generic overload when type is known

Analyzer source

SDK: Built-in CA analyzers in .NET 9 SDK or later

Version: SDK 9.0.102

Describe the bug

When suppressing the above mentioned analyzer notification,
diagnostic ID IDE0079: Remove unnecessary suppression is output by the analyzers.

Steps To Reproduce


Analyzer complains about its own fix


Expected behavior

  1. Suppressing diagnostic ID CA2263 should not output diagnostic ID IDE0079.
  2. In a Test project, CA2263 should not be generated at all, because the diagnosed call might be the one to be unit tested.

Actual behavior

When suppressing diagnostic ID CA2263, diagnostic ID IDE0079 is generated by the analyzers.

@SetTrend
Copy link
Author

SetTrend commented Feb 4, 2025

This seems a generic issue: The same is true for analyzer warning: "MSTEST0018: DynamicData should be valid"

@SetTrend SetTrend changed the title CA2263: Analyzer complains about its own fix Analyzer complains about its own fix Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant