-
Notifications
You must be signed in to change notification settings - Fork 235
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
Should nullable reference types be supported, or have their code analysis warnings disabled inside the file via pragma's? #156
Comments
I'm not sure, I think you can turn off nullable types in a file with a directive? One could always submit a pr for it :) |
I figured out that you can specify individual files in an
I'll leave this issue open to see if modifying |
Thanks for the suggestion @kmgallahan . Does these rules in the |
@adydecki It works for me. Your file may be in a location that isn't being used:
|
I like TinyIoC, but it produces ~100 warnings and messages when the package is added to a project with nullable reference types enabled.
I'm curious if there is a way to prevent these without creating & adding a dedicated project to my solution with warnings/messages disabled.
TinyIoc.cs
is readonly, so adding a pragma in the file can't be done. I also can't find a way to disable code analysis for this individual file externally. Same goes for disabling nullable ref types for a single file externally.An alternative would be to release a package with support for nullable reference types.
Edit:
I figured out that you can specify individual files in an
.editorconfig
to tailor their code analysis rules.I'll leave this issue open to see if modifying
TinyIoc.cs
with pragma's to disable warnings/messages is something the author / community might be interested in (or adding support for nullability / releasing a separate package / using ifdef magic).The text was updated successfully, but these errors were encountered: