summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-02-27 10:12:20 +0800
committerGitHub <noreply@github.com>2024-02-27 10:12:20 +0800
commit85f7e6f962ed47afa00ac7fd57e6130419d973ce (patch)
tree35f2e3549672edceeb6466a6af845a46a4c3ea5c /script
parent16d39f0d3625076983d997ef718a7b54e6cdfb2d (diff)
parentfe6285335360e62a511ff55417c810c0364dd37a (diff)
downloadlua-language-server-85f7e6f962ed47afa00ac7fd57e6130419d973ce.zip
Merge pull request #2546 from emmericp/check-only-ws
Only load files in workspace for --check (skip libraries)
Diffstat (limited to 'script')
-rw-r--r--script/cli/check.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/cli/check.lua b/script/cli/check.lua
index 146035b6..84ac8766 100644
--- a/script/cli/check.lua
+++ b/script/cli/check.lua
@@ -27,6 +27,7 @@ if not rootUri then
print(lang.script('CLI_CHECK_ERROR_URI', rootPath))
return
end
+rootUri = rootUri:gsub("/$", "")
if CHECKLEVEL then
if not define.DiagnosticSeverity[CHECKLEVEL] then
@@ -70,7 +71,7 @@ lclient():start(function (client)
end
config.set(rootUri, 'Lua.diagnostics.disable', util.getTableKeys(disables, true))
- local uris = files.getAllUris(rootUri)
+ local uris = files.getChildFiles(rootUri)
local max = #uris
for i, uri in ipairs(uris) do
files.open(uri)