Parent: #4442
Convention
Two-letter acronyms should be all-uppercase when not part of longer compound identifiers, with exceptions like Vm, Id.
Source: Azure SDK for .NET Mgmt Naming Conventions
Observed today
A scan of Azure/azure-rest-api-specs (334 client.tsp files, 10,754 csharp-scoped @@clientName decorators) shows 221 decorators currently encoding this rule by hand. Examples:
VirtualMachineScaleSetIpTag → ComputeFleetVmssIPTag (azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/client.tsp)
IpAddress → LargeInstanceIPAddress (azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/client.tsp)
cosmosDbResourceId → cosmosDBResourceId (agricultureplatform/AgriculturePlatform.Management/client.tsp)
CosmosDb → CosmosDB (billingbenefits/BillingBenefits.Management/client.tsp)
OsProfile → LargeInstanceOSProfile (azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/client.tsp)
HciOsProfile → HciOSProfile (azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/client.tsp)
Proposed linter
Detection
Walk all model / property / parameter / enum names. Flag any segment matching the acronym dictionary (Db, Ip, Os, Sql, Url, Uri, Tls, Ssl, Cpu, Gpu, Dns, Tcp, Udp, Sas, Aks, Acl, Api, Http, Https, Xml, Json, ...) where the canonical .NET casing is fully upper. Honor exceptions: Vm, Id.
Auto-fix
Insert @@clientName(..., "csharp") with the corrected acronym casing.
Scope
The rule should be csharp-scoped — it only flags violations of the .NET convention, not the underlying TypeSpec name. It should suggest inserting a @@clientName(..., "csharp") override when the underlying TypeSpec name is intentional, or renaming the TypeSpec model when the convention applies cross-language.
Acceptance criteria
Parent: #4442
Convention
Two-letter acronyms should be all-uppercase when not part of longer compound identifiers, with exceptions like
Vm,Id.Observed today
A scan of
Azure/azure-rest-api-specs(334client.tspfiles, 10,754 csharp-scoped@@clientNamedecorators) shows 221 decorators currently encoding this rule by hand. Examples:VirtualMachineScaleSetIpTag→ComputeFleetVmssIPTag(azurefleet/resource-manager/Microsoft.AzureFleet/AzureFleet/client.tsp)IpAddress→LargeInstanceIPAddress(azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/client.tsp)cosmosDbResourceId→cosmosDBResourceId(agricultureplatform/AgriculturePlatform.Management/client.tsp)CosmosDb→CosmosDB(billingbenefits/BillingBenefits.Management/client.tsp)OsProfile→LargeInstanceOSProfile(azurelargeinstance/resource-manager/Microsoft.AzureLargeInstance/AzureLargeInstance/client.tsp)HciOsProfile→HciOSProfile(azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/client.tsp)Proposed linter
Detection
Walk all model / property / parameter / enum names. Flag any segment matching the acronym dictionary (
Db,Ip,Os,Sql,Url,Uri,Tls,Ssl,Cpu,Gpu,Dns,Tcp,Udp,Sas,Aks,Acl,Api,Http,Https,Xml,Json, ...) where the canonical .NET casing is fully upper. Honor exceptions:Vm,Id.Auto-fix
Insert
@@clientName(..., "csharp")with the corrected acronym casing.Scope
The rule should be csharp-scoped — it only flags violations of the .NET convention, not the underlying TypeSpec name. It should suggest inserting a
@@clientName(..., "csharp")override when the underlying TypeSpec name is intentional, or renaming the TypeSpec model when the convention applies cross-language.Acceptance criteria
@azure-tools/typespec-client-generator-coreor@azure-tools/typespec-azure-resource-manager).website/src/content/docs/docs/libraries/.../rules/..chronus/changes/entry.