Skip to content

Publish optional zero-reference diagnostics #2

Description

@Ky6uk

Summary

Publish zero-reference findings through an optional VS Code diagnostic collection.

Motivation

Diagnostics provide native Problems navigation and can mark unused declarations without introducing a custom view. DiagnosticSeverity.Hint together with DiagnosticTag.Unnecessary matches the meaning of a conservative zero-reference finding.

Scope

  • Create a named Zero Reference diagnostic collection.
  • Add an opt-in diagnostics setting; keep existing CodeLens behavior unchanged by default.
  • Publish diagnostics at the exact declaration-name range.
  • Use DiagnosticSeverity.Hint, DiagnosticTag.Unnecessary, and a stable diagnostic code.
  • Reuse existing analysis results instead of running a second reference lookup pass.
  • Replace or clear stale diagnostics when a document is reanalyzed, disabled, removed, or no longer supported.
  • Preserve raw provider failures in a Zero Reference output channel without showing technical notifications to users.

Acceptance criteria

  • Findings appear in the Problems panel and navigate to the declaration.
  • Unnecessary declarations use the editor theme's native unnecessary-code presentation.
  • Disabled diagnostics leave no Zero Reference entries behind.
  • Used, ambiguous, external, and unresolved symbols do not produce diagnostics.
  • Diagnostic lifecycle and error logging have focused Extension Host tests.

Dependencies

Out of scope

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions