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

Add Microsoft.Extensions.Logging.Abstractions annotations #202

Closed x-cubed closed 3 years ago

x-cubed commented 3 years ago

Adds the StringFormatMethodAttribute definitions from robv8r/resharper-annotations but without the version attribute, as the affected methods & parameters are the same (so far) across all versions of Microsoft.Extensions.Logging.Abstractions.

The only catch I've noticed is that ReSharper prefers numbered arguments (eg: {0}) over named arguments (eg: {value}), where the logging abstractions support both. However, the StringFormatMethodAttribute doesn't have any available properties to change this behaviour, and the additional syntax highlighting is better than not having any.

sirduke commented 3 years ago

reverted because https://youtrack.jetbrains.com/issue/RSRP-482890

x-cubed commented 3 years ago

@SirDuke I mentioned that issue in my original comment above.

I'm not aware of any way to change the behaviour of StringFormatMethodAttribute to allow named parameters, but the additional syntax highlighting it provides is better than not having any.

sirduke commented 3 years ago

@x-cubed it needs to be fixed on ReSharper's side