From c9b94234048a9608a732e85251757d02fcf19c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 5 Jan 2022 16:46:08 +0800 Subject: cleanup --- script/core/diagnostics/init.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'script/core') diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua index 4e2a4976..50233559 100644 --- a/script/core/diagnostics/init.lua +++ b/script/core/diagnostics/init.lua @@ -19,7 +19,7 @@ table.sort(diagList, function (a, b) return (diagSort[a] or 0) < (diagSort[b] or 0) end) -local function check(uri, name, results) +local function check(uri, name, response) if config.get(uri, 'Lua.diagnostics.disable')[name] then return end @@ -53,7 +53,7 @@ local function check(uri, name, results) mark[result.start] = true result.level = severity or result.level result.code = name - results[#results+1] = result + response(result) end, name) local passed = os.clock() - clock if passed >= 0.5 then @@ -77,8 +77,6 @@ return function (uri, response) for _, name in ipairs(diagList) do await.delay() - local results = {} - check(uri, name, results) - response(results) + check(uri, name, response) end end -- cgit v1.2.3