Azure / Azure/azure-sdk-tools

.NET analyzer AZC0035 does not detect model factory methods for certain generic types

Open
#12,428 0 comments 0 reactions 1 assignee Claimed by @m-nash View on GitHub
.NET .NETClientSDKAnalyzers needs-triage
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
144

Description

The AZC0035 analyzer fails to recognize factory methods for some generic types, causing false warnings. For example, `SuggestResults` has a corresponding factory method [`SearchModelFactory.SuggestResults(...)`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/src/Models/SuggestResults.cs#L119), but the analyzer still reports an error requiring AZC0035 suppression.

Affected SDK: Azure.Search.Documents

For more details: https://github.com/Azure/azure-sdk-for-net/pull/53042#discussion_r2415107268

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.