Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Azure/typespec-azure into f…
Browse files Browse the repository at this point in the history
…ix_usage_for_additional_properties
  • Loading branch information
iscai-msft committed Feb 23, 2024
2 parents 4ff5903 + bb538c0 commit 2b4165a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: internal
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Fix `missing-x-ms-identifiers` rule triggering for every `enum`
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
ArrayModelType,
Enum,
ModelProperty,
Program,
createRule,
Expand All @@ -23,13 +22,6 @@ export const missingXmsIdentifiersRule = createRule({
},
create(context) {
return {
enum: (en: Enum) => {
context.reportDiagnostic({
format: { enumName: en.name },
target: en,
});
},

modelProperty: (property: ModelProperty) => {
const type = property.type;
if (type.kind === "Model" && isArrayModelType(context.program, type)) {
Expand Down

0 comments on commit 2b4165a

Please sign in to comment.