Skip to content

Add global diagnostic source attribution for validation output#239

Draft
shahabdsh wants to merge 1 commit intoplayer-ui:mainfrom
shahabdsh:sdeljoo/diagnostic-source-attribution
Draft

Add global diagnostic source attribution for validation output#239
shahabdsh wants to merge 1 commit intoplayer-ui:mainfrom
shahabdsh:sdeljoo/diagnostic-source-attribution

Conversation

@shahabdsh
Copy link
Contributor

Summary

  • add centralized source attribution in PlayerLanguageService by wrapping validate and onValidateEnd hook taps so diagnostics inherit the emitting plugin name when source is missing
  • add parser-level source labeling (json-parse) and fallback normalization so diagnostics always include source even when plugins return rebuilt diagnostic arrays
  • extend validation tests and snapshots in json-language-service and complexity-check-plugin to assert source metadata is preserved for validate-phase and onValidateEnd diagnostics

Test plan

  • pnpm vitest run "language/json-language-service/src/__tests__/service.test.ts" "language/complexity-check-plugin/src/__tests__/complexity-check-plugin.test.ts"

Made with Cursor

Wrap validation hooks to stamp plugin names onto diagnostics and add parser-source labeling so consumers can trace validation origins without per-plugin updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments