Disabling the NotNull attribute
Hello,
As of the last few versions or so of Rider, using null-checks in Rider causes an automatic reference to Jetbrains.Annotations and adds the [NotNull] attribute to parameters and fields. This breaks our team coding standards, so I always end up needing to manually remove it. Is there a way to disable this in settings? Toggling every seemingly related setting did nothing.
Please sign in to leave a comment.
Hello Eric,
You can disable addition of [NotNull] attribute by disabling Automatically propagate annotations option located under Settings -> Editor -> Inspection Settings -> Code Annotations
Let me know if this helps.
Worked perfectly! Thanks!
Thank you for the update. I'm glad it helped!
If you have any questions in the future, do not hesitate to contact us again.