summaryrefslogtreecommitdiff
path: root/script/cli
diff options
context:
space:
mode:
authorAleksandr Kovalev <a.kovalev@playrix.com>2022-11-30 18:40:02 +0000
committerAleksandr Kovalev <a.kovalev@playrix.com>2022-11-30 18:40:02 +0000
commit23b819ae698bbfdaa1f049f2c2f1159f84e8f600 (patch)
treee643e06f6292f3e396b99624f9ebbec7f7826299 /script/cli
parentdf0c611e4a0375696d51e1d71cc544d7ee3c4557 (diff)
downloadlua-language-server-23b819ae698bbfdaa1f049f2c2f1159f84e8f600.zip
Fix validation in CLI if diagnostics.severity contains ...! settings
Diffstat (limited to 'script/cli')
-rw-r--r--script/cli/check.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/cli/check.lua b/script/cli/check.lua
index 4df94c59..0addd4d0 100644
--- a/script/cli/check.lua
+++ b/script/cli/check.lua
@@ -53,6 +53,9 @@ lclient():start(function (client)
local disables = util.arrayToHash(config.get(rootUri, 'Lua.diagnostics.disable'))
for name, serverity in pairs(define.DiagnosticDefaultSeverity) do
serverity = config.get(rootUri, 'Lua.diagnostics.severity')[name] or 'Warning'
+ if serverity:sub(-1) == '!' then
+ serverity = serverity:sub(1, -2)
+ end
if define.DiagnosticSeverity[serverity] > checkLevel then
disables[name] = true
end