Skip to content

matej/vscode-diagnostics-comment-awareness#467

Open
voiys wants to merge 5 commits intodmno-dev:mainfrom
voiys:matej/vscode-diagnostics-comment-awareness
Open

matej/vscode-diagnostics-comment-awareness#467
voiys wants to merge 5 commits intodmno-dev:mainfrom
voiys:matej/vscode-diagnostics-comment-awareness

Conversation

@voiys
Copy link
Contributor

@voiys voiys commented Mar 23, 2026

Summary

  • only treat comment lines as decorator-bearing when the comment body starts with @
  • stop regular comments that merely mention @decorator or @type=... from triggering VS Code diagnostics/type validation
  • add regression coverage for both regular-comment cases

Test plan

  • bunx vitest packages/vscode-plugin/test/diagnostics-core.test.ts
  • bun run lint:fix

Examples:

  1. Regular comments are ignored (intellisense does not trigger either, can turn that off if you want)
Screenshot 2026-03-23 at 5 50 32 PM
  1. Post-comments on decorator lines are ignored
Screenshot 2026-03-23 at 5 46 19 PM
  1. Real decorator diagnostics still work
Screenshot 2026-03-23 at 5 46 28 PM
  1. Real type diagnostics still work, but commented trailing type text does not
Screenshot 2026-03-23 at 5 46 42 PM Screenshot 2026-03-23 at 5 46 49 PM

@changeset-bot
Copy link

changeset-bot bot commented Mar 23, 2026

🦋 Changeset detected

Latest commit: 608a027

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@voiys voiys changed the title Fix VS Code diagnostics comment awareness matej/vscode-diagnostics-comment-awareness Mar 23, 2026
@philmillman philmillman requested a review from theoephraim March 23, 2026 17:56
expect(diagnostics).toEqual([]);
});

it('ignores parser-style ignored decorator comments', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this. The real loader will explode when it sees this with an "unknown decorator" kind of error. Maybe we should allow them as noops since they are common though. But either way it should match.

@@ -0,0 +1,2 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

you can add a changeset with the vscode extension tagged. It will merge them all up when we publish together

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants