Azure / Azure/typespec-azure

Add AZC0034 C# type-name conflict linter

Open
#4,915 0 comments 0 reactions 0 assignees View on GitHub
feature lib:tcgc linter
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

Parent: #4442
Draft implementation PR: #4910

## Summary

Add a TypeSpec linter rule for AZC0034-style .NET SDK type-name conflicts. The rule should detect generated C# type names that conflict with reserved Azure SDK type names and offer a deterministic `@@clientName(..., "csharp")` fix.

## Scope

- Use the Azure SDK analyzer reserved-name catalog as the source of truth.
- Detect generated C# model, enum, and union names.
- Suggest a service/namespace-prefixed C# name, for example `Operation` -> `BillingOperation`.
- Add the generated catalog, refresh script, tests, docs, and ruleset registration.

## Acceptance criteria

- The rule reports diagnostics for generated C# model/enum/union names found in the AZC0034 reserved-name catalog.
- The code fix adds a C# `@@clientName` override in `client.tsp`.
- The catalog can be regenerated from the upstream Azure SDK analyzer files.
- The rule is enabled through the appropriate TCGC C# / client SDK ruleset path.

Contributor guide

Open the contributing guide

Research direction

Start with draft implementation PR #4910 and the parent issue #4442, then inspect the TCGC C# / client SDK ruleset path. Review the Azure SDK analyzer reserved-name catalog, generated catalog and refresh script, tests, docs, and client.tsp fix behavior. Done means diagnostics, deterministic C# @@clientName fixes, regeneration, tests, documentation, and ruleset registration are complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.