-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Enable IDE0370 #81500
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
base: main
Are you sure you want to change the base?
Enable IDE0370 #81500
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (commit 1). Nothing aside from the out-of-date comments pointed out by DoctorKrolic (thanks!) Sorry, left comment on wrong PR
jcouv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (commit 1)
Co-authored-by: Cyrus Najmabadi <[email protected]>
|
Note: I expected to see the warning IDE0370 in the build CI legs (since the removal of the unnecessary suppressions is not merged yet) but it's missing. I can repro that with a simple app locally, but replacing the CodeStyle DLLs with ones from roslyn's main fixes that, so I'm assuming that's some already-fixed bug and these warnings will light up in Roslyn CI as well once the fixed CodeStyle assemblies flow back here through SDK. |
Terrifying/fascinating. I hate that this is so complicated. :) |
|
Actually, i'm fairly certain we can't enable this. THe core problem is this:
This is not a problem in the IDE/fixer because the fixer has knowledge of the entire solution, and only remove suppressions that are reported in all the TFMs for a project. So it only removes the suppressions that are completely safe to remove. |
|
Could we enable the analyzer and replace the few problematic suppressions (those in shared files) with assertions? |
Yes. Or change the apis that are called to annotated apis we control. IIRC it's a bunch of annoying apis (likek those in |
|
Note: my general point is that if we do enable, we should likely attempt to see what will fail up front and fix in the same PR. i'm worried about enabling this, then having someone down the line attempt to update the SDK and then end up with dozens or hundreds of issues to fix. that's going to eb painful. |
Follow up on #81499.