Skip to content

Add AZC0034 C# type-name conflict linter #4915

Description

@haiyuazhang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestlib:tcgcIssues for @azure-tools/typespec-client-generator-core librarylinterIssues related to linter rules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions