Azure / Azure/azure-sdk-tools

Static analyzer for ArgumentExceptions thrown from property setters

Open
#6,550 3 comments 0 reactions 0 assignees View on GitHub
.NETClientSDKAnalyzers Client MQ
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

The Framework Design Guidelines state:
**DO use value for the name of the implicit value parameter of property setters.**
in regards to [throwing ArgumentExceptions](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/using-standard-exception-types?redirectedfrom=MSDN#argumentexception-argumentnullexception-and-argumentoutofrangeexception).

In many places in the repo, we use the name of the property. It would be great to have an analyzer to help with this.

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or analyzer entry point are named. Start by reviewing the linked Framework Design Guidelines and locating the repository's existing static-analyzer infrastructure; done means an analyzer identifies ArgumentExceptions from property setters that use the property name instead of value.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.