JetBrains / ExternalAnnotations

JetBrains ReSharper External Annotations
https://www.jetbrains.com/help/resharper/Code_Analysis__External_Annotations.html
MIT License
81 stars 44 forks source link

Annotate `Microsoft.Extensions.Logging` extension methods such as `LogInformation` #220

Open TessenR opened 3 years ago

TessenR commented 3 years ago

There are lots of extension methods that do not allow null extension argument. Currently they don't have neither NRT annotations nor extension annotations so it leads to missing warnings when you call them on nullable objects e.g.

image

Would be nice to have them annotated. Here's the source code with all the methods https://github.com/aspnet/Logging/blob/master/src/Microsoft.Extensions.Logging.Abstractions/LoggerExtensions.cs