Skip to content

Report unused suppressions#10805

Open
timotheeguerin wants to merge 8 commits into
microsoft:mainfrom
timotheeguerin:feature/track-unusued-suppressions
Open

Report unused suppressions#10805
timotheeguerin wants to merge 8 commits into
microsoft:mainfrom
timotheeguerin:feature/track-unusued-suppressions

Conversation

@timotheeguerin

@timotheeguerin timotheeguerin commented May 26, 2026

Copy link
Copy Markdown
Member
image

@microsoft-github-policy-service microsoft-github-policy-service Bot added the compiler:core Issues for @typespec/compiler label May 26, 2026
@pkg-pr-new

pkg-pr-new Bot commented May 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/compiler@10805

commit: b081a35

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - feature ✏️

Dim unused #suppress directives for available compiler and library diagnostics in editor scenarios.,> ,> typespec,> #suppress "deprecated" "old suppression",> model Widget {},>

@azure-sdk-automation

azure-sdk-automation Bot commented May 26, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@markcowl markcowl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is super-cool

I like the gate on the diagnostic being in scope, but I think we should either turn this into an info diagnostic for now, or put it behind an emitter option. I think once we have some experience with this we can make it part of standard (without emitters) compilation.

Note: I assume the idea is that the main user of compilation without emitters is the IDE extensions, and this is a way to get this behavior without having to update the IDEs

Comment thread packages/compiler/src/core/suppression-tracking.ts
Comment thread packages/compiler/src/core/suppression-tracking.ts
Comment thread packages/compiler/src/core/program.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants