Will Resharper ever leverage System.Diagnostics.CodeAnalysis attributes one day?

I've been using JetBrains.Annotations package for a very long time and now I've started using #nullable enable.

Then things became more confusing and bulky as along this new pragma there's a whole new set of attributes in the .NET Framework:

https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis?view=netcore-3.1

AllowNullAttribute
Specifies that null is allowed as an input even if the corresponding type disallows it.

DisallowNullAttribute
Specifies that null is disallowed as an input even if the corresponding type allows it.

DoesNotReturnAttribute
Specifies that a method that will never return under any circumstance.

DoesNotReturnIfAttribute
Specifies that the method will not return if the associated Boolean parameter is passed the specified value.

MaybeNullAttribute
Specifies that an output may be null even if the corresponding type disallows it.

MaybeNullWhenAttribute
Specifies that when a method returns ReturnValue, the parameter may be null even if the corresponding type disallows it.

NotNullAttribute
Specifies that an output is not null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns.

NotNullIfNotNullAttribute
Specifies that the output will be non-null if the named parameter is non-null.

NotNullWhenAttribute
Specifies that when a method returns ReturnValue, the parameter will not be null even if the corresponding type allows it.

Furthermore, R# likes to override shortcuts to ? key, it removes previous set attribute on a member or parameter.

My question is the following:

Will one day R# offer to use these attributes instead of ones in JetBrains.Annotations ?

2 comments
Comment actions Permalink

Have you tried enabling Options -> Code Analysis -> Settings -> Enable nullability analysis when C# 8 compiler nullable warnings are enabled?

0
Comment actions Permalink

I've already enabled it, it gives a few hints but doesn't leverage these attributes at all.

0

Please sign in to leave a comment.