diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-25 21:38:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-25 21:38:57 +0800 |
commit | 5ec8ad22d27051507c55d49d6144f08132976215 (patch) | |
tree | 75c843f738c0283eb19516293f857d29560d9b3c /test/diagnostics/init.lua | |
parent | 24f4dfa889cc66bd05223e5d8d36fa19865c772b (diff) | |
download | lua-language-server-5ec8ad22d27051507c55d49d6144f08132976215.zip |
cleanup
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r-- | test/diagnostics/init.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index 558ffc26..3dfd6518 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -4,9 +4,9 @@ local config = require 'config' local util = require 'utility' local catch = require 'catch' -config.get 'Lua.diagnostics.neededFileStatus'['deprecated'] = 'Any' -config.get 'Lua.diagnostics.neededFileStatus'['type-check'] = 'Any' -config.get 'Lua.diagnostics.neededFileStatus'['await-in-sync'] = 'Any' +config.get(nil, 'Lua.diagnostics.neededFileStatus')['deprecated'] = 'Any' +config.get(nil, 'Lua.diagnostics.neededFileStatus')['type-check'] = 'Any' +config.get(nil, 'Lua.diagnostics.neededFileStatus')['await-in-sync'] = 'Any' rawset(_G, 'TEST', true) @@ -177,7 +177,7 @@ local _ENV = { print = print } print(1) ]] -config.get 'Lua.diagnostics.disable'['undefined-env-child'] = true +config.get(nil, 'Lua.diagnostics.disable')['undefined-env-child'] = true TEST [[ _ENV = nil <!GLOBAL!> = 1 --> _ENV.GLOBAL = 1 @@ -203,7 +203,7 @@ GLOBAL = 1 _ENV = nil ]] -config.get 'Lua.diagnostics.disable'['undefined-env-child'] = nil +config.get(nil, 'Lua.diagnostics.disable')['undefined-env-child'] = nil TEST [[ <!print() ('string')!>:sub(1, 1) @@ -315,17 +315,17 @@ return [[ ]] ]=] -config.get 'Lua.diagnostics.disable'['close-non-object'] = true +config.get(nil, 'Lua.diagnostics.disable')['close-non-object'] = true TEST [[ local _ <close> = function () end ]] -config.get 'Lua.diagnostics.disable'['close-non-object'] = nil +config.get(nil, 'Lua.diagnostics.disable')['close-non-object'] = nil TEST [[ local _ <close> = <!1!> ]] -config.get 'Lua.diagnostics.disable'['unused-local'] = true +config.get(nil, 'Lua.diagnostics.disable')['unused-local'] = true TEST [[ local f = <!function () end!> ]] @@ -338,7 +338,7 @@ TEST [[ local <!function f() end!> ]] -config.get 'Lua.diagnostics.disable'['unused-local'] = nil +config.get(nil, 'Lua.diagnostics.disable')['unused-local'] = nil TEST [[ local mt, x function mt:m() @@ -1427,7 +1427,7 @@ end X = f() ]] -config.get 'Lua.diagnostics.neededFileStatus'['not-yieldable'] = 'Any' +config.get(nil, 'Lua.diagnostics.neededFileStatus')['not-yieldable'] = 'Any' TEST [[ local function f(cb) return cb |