Skip to content

Commit

Permalink
Fix workspace diagnostics not respecting ignore globs for dependents
Browse files Browse the repository at this point in the history
Fixes #43
  • Loading branch information
JohnnyMorganz committed Jun 20, 2022
1 parent 8940094 commit 992ca70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion src/LanguageServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 992ca70

Please sign in to comment.