With C# 8 the feature (non) nullable reference types was introduced.
We want to use it for development of our libraries.
We found that this feature seems to work only “internally”. Constructors, methods and properties exposed as public API need to check for null values because the user of the library may not enable the
So, I’m searching for help in the sonar analyzer to identify possible issues.
So far I found S3900 “Arguments of public methods should be validated against null”.
But this checks only a subset, even the rule name suggests null check at all.
I think, with
Nullable enabled all public/protected contructors, methods and properties should check all its parameters to be null or throw
Is there additional rule(s) existing or planned?