From 12d6a9eb75f31b64cbc89eb3265805bc8dad01f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 15 Feb 2022 20:10:00 +0800 Subject: cleanup --- script/core/diagnostics/undefined-field.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'script/core/diagnostics/undefined-field.lua') 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, -- cgit v1.2.3