diff options
author | Aleksandr Kovalev <a.kovalev@playrix.com> | 2022-11-30 18:40:02 +0000 |
---|---|---|
committer | Aleksandr Kovalev <a.kovalev@playrix.com> | 2022-11-30 18:40:02 +0000 |
commit | 23b819ae698bbfdaa1f049f2c2f1159f84e8f600 (patch) | |
tree | e643e06f6292f3e396b99624f9ebbec7f7826299 /script/cli | |
parent | df0c611e4a0375696d51e1d71cc544d7ee3c4557 (diff) | |
download | lua-language-server-23b819ae698bbfdaa1f049f2c2f1159f84e8f600.zip |
Fix validation in CLI if diagnostics.severity contains ...! settings
Diffstat (limited to 'script/cli')
-rw-r--r-- | script/cli/check.lua | 3 |
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 |