From 992ca7055451348b622a276e8de397c46f32c17e Mon Sep 17 00:00:00 2001 From: JohnnyMorganz Date: Mon, 20 Jun 2022 13:24:16 +0100 Subject: [PATCH] Fix workspace diagnostics not respecting ignore globs for dependents Fixes #43 --- CHANGELOG.md | 1 + src/LanguageServer.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1f3ecd6..d823cd3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fixed equality comparison between enum items raising a type error - Fixed autocompletion of properties with spaces not correctly being converted into a `["property"]` index leading to a type error - Fixed function stringification when using an expression index call such as `data["property"]()` +- Fixed workspace diagnostics not respecting ignore globs for dependent files ## [1.4.0] - 2022-06-12 diff --git a/src/LanguageServer.cpp b/src/LanguageServer.cpp index 87ea6c37..e0cfe120 100644 --- a/src/LanguageServer.cpp +++ b/src/LanguageServer.cpp @@ -417,7 +417,8 @@ void LanguageServer::onDidChangeTextDocument(const lsp::DidChangeTextDocumentPar if (filePath) { auto uri = Uri::file(*filePath); - if (uri != params.textDocument.uri && !contains(diagnostics.relatedDocuments, uri.toString())) + if (uri != params.textDocument.uri && !contains(diagnostics.relatedDocuments, uri.toString()) && + !workspace->isIgnoredFile(*filePath, config)) { auto dependencyDiags = workspace->documentDiagnostics(lsp::DocumentDiagnosticParams{{uri}}); diagnostics.relatedDocuments.emplace(uri.toString(),