From 6b589b9c940441199c9fe5898ce762fc061689a3 Mon Sep 17 00:00:00 2001 From: Brett Saviano Date: Thu, 16 Mar 2023 10:14:06 -0400 Subject: [PATCH] Fixes #268 --- CHANGELOG.md | 1 + server/src/utils/functions.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fd3fb5..98ef8a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [2.3.2] - 2023-XX-XX - Fix issue [#265](https://github.com/intersystems/language-server/issues/265): Support HTML spans in intellisense from class descriptions - Fix issue [#266](https://github.com/intersystems/language-server/issues/266): Preserve empty HTML spans in intellisense from class descriptions +- Fix issue [#268](https://github.com/intersystems/language-server/issues/268): Exempt %SYSTEM classes from existence checking after namespace switch ## [2.3.1] - 2023-03-02 - Fix issue [#77](https://github.com/intersystems/language-server/issues/77): Incorrect 'Class/Routine/Include file does not exist' Diagnostics after namespace switch diff --git a/server/src/utils/functions.ts b/server/src/utils/functions.ts index 9d31739..cf02e76 100644 --- a/server/src/utils/functions.ts +++ b/server/src/utils/functions.ts @@ -536,10 +536,9 @@ export async function computeDiagnostics(doc: TextDocument) { addRangeToMapVal(classes,normalizedname,wordrange); } } - } else if (currentNs != "" && settings.diagnostics.classes) { + } else if (currentNs != "" && settings.diagnostics.classes && !word.startsWith("%SYSTEM.")) { if (!word.includes(".") && !word.startsWith("%")) { // Using a short class name when you may be in another namespace is bad - // TODO: report warning diagnostic? diagnostics.push({ severity: DiagnosticSeverity.Error, range: wordrange,