Parent: #4442
Convention
DO Start property or parameter names of type bool with a verb, like Is, Can, Has prefix.
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 576 decorators currently encoding this rule by hand. Examples:
tracked → IsTracked (advisor/resource-manager/Microsoft.Advisor/Advisor/client.tsp)
exclude → IsExcluded (advisor/resource-manager/Microsoft.Advisor/Advisor/client.tsp)
dynamicFieldSchema → HasDynamicFieldSchema (ai/ContentUnderstanding/client.tsp)
omitContent → ShouldOmitContent (ai/ContentUnderstanding/client.tsp)
returnDetails → ShouldReturnDetails (ai/ContentUnderstanding/client.tsp)
restore → IsRestore (apicenter/ApiCenter.Management/client.tsp)
Proposed linter
Detection
Walk Model properties and Operation parameters whose effective type resolves to boolean. Flag when the (csharp-cased) name does not begin with Is, Has, Can, Should, Are, Was, Will, Do, or Does followed by an uppercase letter.
Auto-fix
Suggest @@clientName(<target>, "Is<PascalName>", "csharp"). Heuristic: choose Is by default; Has for collections/flags; Can for capabilities.
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
DO Start property or parameter names of type
boolwith a verb, likeIs,Can,Hasprefix.Observed today
A scan of
Azure/azure-rest-api-specs(334client.tspfiles, 10,754 csharp-scoped@@clientNamedecorators) shows 576 decorators currently encoding this rule by hand. Examples:tracked→IsTracked(advisor/resource-manager/Microsoft.Advisor/Advisor/client.tsp)exclude→IsExcluded(advisor/resource-manager/Microsoft.Advisor/Advisor/client.tsp)dynamicFieldSchema→HasDynamicFieldSchema(ai/ContentUnderstanding/client.tsp)omitContent→ShouldOmitContent(ai/ContentUnderstanding/client.tsp)returnDetails→ShouldReturnDetails(ai/ContentUnderstanding/client.tsp)restore→IsRestore(apicenter/ApiCenter.Management/client.tsp)Proposed linter
Detection
Walk Model properties and Operation parameters whose effective type resolves to
boolean. Flag when the (csharp-cased) name does not begin withIs,Has,Can,Should,Are,Was,Will,Do, orDoesfollowed by an uppercase letter.Auto-fix
Suggest
@@clientName(<target>, "Is<PascalName>", "csharp"). Heuristic: chooseIsby default;Hasfor collections/flags;Canfor capabilities.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.