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

Merged
merged 42 commits into from
Feb 28, 2025

Conversation

chunyu3
Copy link
Contributor

@chunyu3 chunyu3 commented Jan 6, 2025

Fix #181
Fix #5488
Fix #5489

  • 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
Show changes

@typespec/compiler - feature ✏️

Support diagnostics for unused template parameter

@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

azure-sdk commented Jan 6, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@markcowl markcowl self-assigned this Jan 9, 2025
Copy link
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that we want to do this

@chunyu3 chunyu3 force-pushed the fix181 branch 2 times, most recently from 66e16cd to 55b8f4f Compare February 25, 2025 06:39
Copy link
Member

@timotheeguerin timotheeguerin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@chunyu3 chunyu3 added this pull request to the merge queue Feb 27, 2025
Merged via the queue into microsoft:main with commit d37525e Feb 28, 2025
24 checks passed
@chunyu3 chunyu3 deleted the fix181 branch February 28, 2025 00:32
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
4 participants