summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-01 11:49:22 +0800
committerGitHub <noreply@github.com>2022-12-01 11:49:22 +0800
commit1b67188ff42542031c23e011a474a759a10df380 (patch)
treee643e06f6292f3e396b99624f9ebbec7f7826299
parentdf0c611e4a0375696d51e1d71cc544d7ee3c4557 (diff)
parent23b819ae698bbfdaa1f049f2c2f1159f84e8f600 (diff)
downloadlua-language-server-1b67188ff42542031c23e011a474a759a10df380.zip
Merge pull request #1742 from A-Kovalev-Playrix/master
Fix validation in CLI if diagnostics.severity contains ...! settings
-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