dennisdoomen / CSharpGuidelines

A set of coding guidelines for C# 9.0, design principles and layout rules for improving the overall quality of your code development.
https://www.csharpcodingguidelines.com
Other
746 stars 271 forks source link

AV1580 being triggered by code from external library #269

Closed shoter closed 9 months ago

shoter commented 9 months ago

Today i've added your library to my project. It is a nice set of analyzers! Good job :)

I've encountered an error within a library where analyzer AV1580 can be triggered on code that is from outside library. I am trying to call TryAsync in following code and this invocation is reported as wrong because first parameter of TryAsync has name v. This method is outside my control and I think that it should not trigger this response.

0>IAdminPortClientExtensions.cs(11,38): Error AV1580 : Argument for parameter 'v' in method call to 'Prelude.TryAsync<ServerStatus>(Task<ServerStatus>)' calls nested method 'IAdminPortClient.QueryServerStatus(CancellationToken)' (https://github.com/dennisdoomen/CSharpGuidelines/blob/5.6.0/_rules/1580.md)

image

shoter commented 9 months ago

My bad - i thought error is reffering to parameter v. I did not read it correctly :)