From 444851fc1adb2fe3a0f952807cb4b644e18790c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 8 Nov 2019 11:44:04 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=BA=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-beta/src/core/diagnostics/global-in-nil-env.lua | 2 +- server-beta/src/core/diagnostics/init.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'server-beta/src/core') diff --git a/server-beta/src/core/diagnostics/global-in-nil-env.lua b/server-beta/src/core/diagnostics/global-in-nil-env.lua index 72375ea5..d8cc0075 100644 --- a/server-beta/src/core/diagnostics/global-in-nil-env.lua +++ b/server-beta/src/core/diagnostics/global-in-nil-env.lua @@ -50,7 +50,7 @@ return function (uri, callback) finish = source.finish, uri = uri, message = lang.script.DIAG_GLOBAL_IN_NIL_ENV, - relative = { + related = { { start = ok.start, finish = ok.finish, diff --git a/server-beta/src/core/diagnostics/init.lua b/server-beta/src/core/diagnostics/init.lua index 8b6167cc..2972694d 100644 --- a/server-beta/src/core/diagnostics/init.lua +++ b/server-beta/src/core/diagnostics/init.lua @@ -7,8 +7,9 @@ local function check(uri, name, level, results) return end level = config.config.diagnostics.severity[name] or level + local severity = define.DiagnosticSeverity[level] require('core.diagnostics.' .. name)(uri, function (result) - result.level = level or result.level + result.level = severity or result.level result.code = name results[#results+1] = result end, name) -- cgit v1.2.3