diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-12-01 11:49:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 11:49:22 +0800 |
commit | 1b67188ff42542031c23e011a474a759a10df380 (patch) | |
tree | e643e06f6292f3e396b99624f9ebbec7f7826299 | |
parent | df0c611e4a0375696d51e1d71cc544d7ee3c4557 (diff) | |
parent | 23b819ae698bbfdaa1f049f2c2f1159f84e8f600 (diff) | |
download | lua-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.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 |