mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-07 23:36:03 +01:00
fc9a595992
* 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>