From 605f357e25ec1c6a0eaa896e5f1a64eb0325eb35 Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Wed, 11 Nov 2026 12:00:47 +0100 Subject: [PATCH] fix: `--check` diagnoses every file twice `files.open` already diagnoses the file through the `open` handler in provider/diagnostic.lua, so the explicit `doDiagnostic` call repeated it. Co-Authored-By: Claude Opus 5.5 --- changelog.md | 1 + script/cli/check_worker.lua | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index daefdb5ae..0c72db47a 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased +* `FIX` `--check` no longer diagnoses every file twice ## 3.19.2 `2026-10-13` diff --git a/script/cli/check_worker.lua b/script/cli/check_worker.lua index 83440df0a..b2feba982 100644 --- a/script/cli/check_worker.lua +++ b/script/cli/check_worker.lua @@ -2,7 +2,6 @@ local lclient = require 'lclient'() local furi = require 'file-uri' local ws = require 'workspace' local files = require 'files' -local diag = require 'provider.diagnostic' local util = require 'utility' local jsonb = require 'json-beautify' local lang = require 'language' @@ -249,7 +248,6 @@ function export.runCLI() for i, uri in ipairs(uris) do if (i % numThreads + 1) == threadId and not ws.isIgnored(uri) then files.open(uri) - diag.doDiagnostic(uri, true) -- Print regularly but always print the last entry to ensure -- that logs written to files don't look incomplete. if not quiet and (os.clock() - lastClock > 0.2 or i == #uris) then