Skip to content

Add VS hidden-in-editor tag for Unnecessary diagnostics and cover with manual fourslash tests#4003

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-for-review-comment
Draft

Add VS hidden-in-editor tag for Unnecessary diagnostics and cover with manual fourslash tests#4003
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-for-review-comment

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

This addresses the review comment requesting coverage for VS-specific diagnostic tag conversion. The change ensures Unnecessary diagnostics include the VS extension tag when VS extensions are enabled, while preserving non-VS behavior.

  • Diagnostic tag conversion

    • Updated internal/ls/lsconv/converters.go to append the VS hidden-in-editor tag (DiagnosticTag(2147483641)) when:
      • the diagnostic reports Unnecessary, and
      • client capabilities indicate Visual Studio extensions support.
  • Manual fourslash coverage (requested)

    • Added internal/fourslash/tests/manual/unnecessarySuggestionVsDiagnosticTags_test.go with two focused cases:
      • non-VS capabilities: emits only DiagnosticTagUnnecessary
      • VS capabilities: emits DiagnosticTagUnnecessary + VS hidden-in-editor tag
if diagnostic.ReportsUnnecessary() && slices.Contains(opts.tagValueSet, lsproto.DiagnosticTagUnnecessary) {
    tags = append(tags, lsproto.DiagnosticTagUnnecessary)
    if opts.visualStudio {
        tags = append(tags, diagnosticTagVsHiddenInEditor) // DiagnosticTag(2147483641)
    }
}

Co-authored-by: joj <2939999+joj@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code based on review comment Add VS hidden-in-editor tag for Unnecessary diagnostics and cover with manual fourslash tests May 20, 2026
Copilot AI requested a review from joj May 20, 2026 17:01
Copilot finished work on behalf of joj May 20, 2026 17:01
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.

2 participants