Files
vscode/extensions
vs-code-engineering[bot] fc9a595992 fix: drop diagnostics with missing range at the language diagnostics boundary (fixes #323148) (#323153)
* fix: drop diagnostics with missing range at the language diagnostics boundary

Other extensions can publish vscode.Diagnostic entries whose `range` is
undefined (violating the non-nullable `range: Range` type via an `any` cast).
These reach copilot verbatim through `vscode.languages.getDiagnostics()` and
crash the many consumers that dereference `diagnostic.range` - notably the
`LintErrors.getData` telemetry path that scans every extension's diagnostics
via `getAllDiagnostics()`. Sanitize at the boundary service so every consumer
is protected once, and log dropped entries so the producer stays diagnosable.

Fixes microsoft/vscode#323148

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: Copilot - Test lint — use strict equality for range null/undefined check

The eqeqeq ESLint rule (configured as 'warn', enforced with --max-warnings=0)
flagged `range != null` in _dropMalformedDiagnostics. Replace the loose
equality with an explicit strict check that preserves the original semantics
of dropping diagnostics whose range is either null or undefined.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 18:28:43 +00:00
..