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

issue diagnostic for a templated model with a template parameter that is not used. #5494

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

chunyu3
Copy link
Contributor

@chunyu3 chunyu3 commented Jan 6, 2025

Fix #181
Fix #5488

  • check all the usage of the template parameter, if a template parameter is not used, issue diagnostic and dim the template parameter.
  • implement codeFix for unused-template-parameter diagnostic: remove the unused template parameter.

@microsoft-github-policy-service microsoft-github-policy-service bot added the compiler:core Issues for @typespec/compiler label Jan 6, 2025
@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 6, 2025

All changed packages have been documented.

  • @typespec/compiler
  • @typespec/protobuf
Show changes

@typespec/compiler - feature ✏️

Support diagnostics for unused template parameter in model template

@typespec/protobuf - internal ✏️

Suppress unused-template-parameter diagnostic for Map model

@chunyu3 chunyu3 added ide Issues for VS, VSCode, Monaco, etc. and removed compiler:core Issues for @typespec/compiler labels Jan 6, 2025
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unused template parameter in model template Unused template parameter silently ignored
2 participants