Skip to content

matej/vscode-duplicate-decorator-rules#468

Open
voiys wants to merge 3 commits intodmno-dev:mainfrom
voiys:matej/vscode-duplicate-decorator-rules
Open

matej/vscode-duplicate-decorator-rules#468
voiys wants to merge 3 commits intodmno-dev:mainfrom
voiys:matej/vscode-duplicate-decorator-rules

Conversation

@voiys
Copy link
Contributor

@voiys voiys commented Mar 23, 2026

Summary

  • stop flagging repeated function-style decorators such as plugin-provided @initOp(...) entries as duplicate single-use decorators
  • keep duplicate checking active across split header comment blocks before the first config item
  • add focused regression coverage and the release metadata needed for the extension fix

Test plan

  • bun x vitest --run test/diagnostics-core.test.ts test/diagnostics-provider.test.ts in packages/vscode-plugin
  • bun run test:ci in packages/vscode-plugin
  • bun run build:libs
  • bun run lint:fix at repo root

Examples:

  1. Plugin function decorators can repeat in the same header block
Screenshot 2026-03-23 at 6 03 07 PM
  1. Plugin function decorators can repeat across header blocks before the first item
Screenshot 2026-03-23 at 6 07 42 PM
  1. Non-function root decorators still error across header blocks
Screenshot 2026-03-23 at 6 03 57 PM
  1. Non-function item decorators still error
Screenshot 2026-03-23 at 6 04 03 PM
  1. Built-in repeatable function decorators still stay allowed
Screenshot 2026-03-23 at 6 04 12 PM

@changeset-bot
Copy link

changeset-bot bot commented Mar 23, 2026

🦋 Changeset detected

Latest commit: 3d06f2a

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

This PR includes changesets to release 1 package
Name Type
env-spec-language Patch

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

@theoephraim
Copy link
Member

From your screenshot 3 it looks like the logic is a little off with the header stuff. Comment blocks are all part of the header until the first item, but the comments directly preceeding that item are attached to the item and are not part of the header. Comment blocks are broken by either a blank line or a divider (# ---)

# header

# still part of the header

# attached to item
ITEM1=

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.

2 participants