-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Consider enabling strict roslyn setting #3645
Comments
From @davidfowl on Monday, July 30, 2018 9:04:07 AM We use structs all over, there’s probably code comparing a StringValues to null elsewhere. |
From @Eilon on Monday, July 30, 2018 11:41:24 AM OK. We can still preempt a lot of the fallout by fixing up areas where we know it'll be a disaster. |
Triage team: let's give this a try. If there are a crazy amount of compiler errors, let's chat first before you spend too much time correcting all of them. |
@natemcmaster @pakrym is there a summary somewhere of the benefits of C# strict mode? Is this something we should consider enabling for the EF Core codebase as well? |
It enables Roslyn diagnostics that would be a breaking change to enable by default. I wasn't able to find the exact list of diagnostics but the most useful from my experience is struct to a null comparison check.
Yes, corefx, roslyn has had it enabled for some time and it caught a couple minor bugs in AspNetCore. You can get a rough idea which diagnostics are enabled by looking through roslyns source: https://github.com/dotnet/roslyn/search?l=C%23&q=FeatureStrictEnabled&type= |
Thanks @pakrym. |
Done. |
From @pakrym on Sunday, July 29, 2018 7:59:29 PM
See: dotnet/corefx#31457
cc @natemcmaster @davidfowl @Eilon
Copied from original issue: aspnet/Universe#1285
The text was updated successfully, but these errors were encountered: