From 167427420b3965065c628c52a11e480bd6346da9 Mon Sep 17 00:00:00 2001 From: Felix Lisczyk <5102728+FelixLisczyk@users.noreply.github.com> Date: Tue, 16 Jan 2024 10:43:20 +0100 Subject: [PATCH] fix: no lintable files found when navigating to Swift interface files --- src/lint.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lint.ts b/src/lint.ts index 5c67c2d..ea96f20 100644 --- a/src/lint.ts +++ b/src/lint.ts @@ -53,6 +53,11 @@ export async function diagnosticsForDocument(request: { return []; } + // Skip linting if the user navigates to a system framework interface file. + if (request.document.uri.fsPath.includes(".swiftinterface")) { + return []; + } + const workspaceOrRoot = request.workspaceFolder?.uri.fsPath ?? path.normalize("/"); const relativeDocumentPath = path.relative(