Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linter rule for anonymous models #431

Open
catalinaperalta opened this issue Mar 15, 2024 · 2 comments
Open

Add linter rule for anonymous models #431

catalinaperalta opened this issue Mar 15, 2024 · 2 comments
Labels
breaking-change A change that might cause specs or code to break feature New feature or request lib:azure-core Issues for @azure-tools/typespec-azure-core library
Milestone

Comments

@catalinaperalta
Copy link
Member

catalinaperalta commented Mar 15, 2024

It would be great to have a linter rule call out anonymous models to help service teams avoid them as they define their spec, since this causes issues with the emitters later on. Based on this previous issue https://github.com/Azure/typespec-azure-pr/issues/2367 seems it is hard to catch all cases of anonymous models and this linter rule cannot warn for every case, but it would be useful to try to catch common scenarios where anonymous models cause issues for emitters, such as inline anonymous models passed into the standard templates.

@catalinaperalta
Copy link
Member Author

After talking to @timotheeguerin, seems like these might be best added as part of TCGC linter rules. If so, we'd need to have azure specs extend those linter rules as well. This issue could help with how we extend these additional rules: microsoft/typespec#3011

@markcowl markcowl added lib:tcgc Issues for @azure-tools/typespec-client-generator-core library linting design:needed A design request has been raised that needs a proposal and removed needs-area labels Mar 22, 2024
@markcowl markcowl added this to the [2024] May milestone Mar 22, 2024
@markcowl markcowl modified the milestones: [2024] May, [2024] June May 6, 2024
@markcowl markcowl modified the milestones: [2024] June, [2024] July Jun 17, 2024
@markcowl markcowl added feature New feature or request and removed design:needed A design request has been raised that needs a proposal labels Jun 17, 2024
@iscai-msft
Copy link
Contributor

Removing the tcgc label from this, because "spread is spread" largely gets away from this issue for tcgc generation.

@iscai-msft iscai-msft added lib:azure-core Issues for @azure-tools/typespec-azure-core library and removed lib:tcgc Issues for @azure-tools/typespec-client-generator-core library labels Jun 24, 2024
@markcowl markcowl modified the milestones: [2024] July, [2024] August Jul 19, 2024
@markcowl markcowl modified the milestones: [2024] August, [2024] October Aug 9, 2024
@markcowl markcowl added the breaking-change A change that might cause specs or code to break label Oct 15, 2024
@markcowl markcowl modified the milestones: [2024] November, Backlog Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change A change that might cause specs or code to break feature New feature or request lib:azure-core Issues for @azure-tools/typespec-azure-core library
Projects
None yet
Development

No branches or pull requests

4 participants