`@azure-tools/typespec-azure-core/bad-record-type` trigger for `model is` usage
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
migrate from https://github.com/Azure/typespec-azure-pr/issues/3054
When referencing a model that is defined with `model is Record` then you get the error again
```
@doc("Foo")
model Foo is Record;
@doc("Bar")
model Bar {
/**
* Should not fire here
* @azure-tools/typespec-azure-core/bad-record-type
*/
foo: Foo;
}
```
[Playground Link](https://azure.github.io/typespec-azure/playground?c=QGRvYygiRm9vIikKbW9kZWwgRm9vIGlzIFJlY29yZDx1bmtub3duPjsKCsYrQmFyyStCYXIgewogIC8qKgogICAqIFNob3VsZCBub3QgZmlyZSBoZXJlxhpAYXp1cmUtdG9vbHMvdHlwZXNwZWMtxhVjb3JlL2JhZC1yxXQtxB%2FFNi8KICBmb2865ACUOwp9Cg%3D%3D&e=%40azure-tools%2Ftypespec-autorest&options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40azure-tools%2Ftypespec-azure-rulesets%2Fdata-plane%22%5D%7D%7D)
Contributor guide
Research direction
Reproduce the diagnostic in the linked TypeSpec Azure Playground example, then trace the @azure-tools/typespec-azure-core/bad-record-type rule that handles model references. Done means the rule no longer reports on foo: Foo when Foo is defined with model is Record, while the reported regression is covered by a test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100