diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-02-15 20:10:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-02-15 20:10:00 +0800 |
commit | 12d6a9eb75f31b64cbc89eb3265805bc8dad01f0 (patch) | |
tree | 031a449c1222ef1705d34fbb22c11ef1ea388ee5 /script/core/diagnostics/undefined-field.lua | |
parent | bf8b18fe8d2f3cc470021e32b9d5f11ec765a643 (diff) | |
download | lua-language-server-12d6a9eb75f31b64cbc89eb3265805bc8dad01f0.zip |
cleanup
Diffstat (limited to 'script/core/diagnostics/undefined-field.lua')
-rw-r--r-- | script/core/diagnostics/undefined-field.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/core/diagnostics/undefined-field.lua b/script/core/diagnostics/undefined-field.lua index 2e64f0cc..7d309096 100644 --- a/script/core/diagnostics/undefined-field.lua +++ b/script/core/diagnostics/undefined-field.lua @@ -5,7 +5,7 @@ local guide = require 'parser.guide' local noder = require 'core.noder' local await = require 'await' -local SkipCheckClass = { +local skipCheckClass = { ['unknown'] = true, ['any'] = true, ['table'] = true, @@ -49,7 +49,7 @@ return function (uri, callback) local ok for _, def in ipairs(defs) do if def.type == 'doc.class.name' - and not SkipCheckClass[def[1]] then + and not skipCheckClass[def[1]] then ok = true break end @@ -60,7 +60,7 @@ return function (uri, callback) end end local message = lang.script('DIAG_UNDEF_FIELD', guide.getKeyName(src)) - if src.type == 'getfield' and src.field then + if src.type == 'getfield' and src.field then callback { start = src.field.start, finish = src.field.finish, |