From 844bc87bcb11fade43e06b5e8ac8421f2b0d3630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 17 Jun 2021 14:39:05 +0800 Subject: improve --- script/core/diagnostics/redundant-parameter.lua | 10 +--------- script/proto/define.lua | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'script') diff --git a/script/core/diagnostics/redundant-parameter.lua b/script/core/diagnostics/redundant-parameter.lua index a2e60b71..b25ec77a 100644 --- a/script/core/diagnostics/redundant-parameter.lua +++ b/script/core/diagnostics/redundant-parameter.lua @@ -3,7 +3,6 @@ local guide = require 'parser.guide' local vm = require 'vm' local lang = require 'language' local define = require 'proto.define' -local await = require 'await' local function countCallArgs(source) local result = 0 @@ -81,14 +80,7 @@ return function (uri, callback) end local func = source.node - local funcArgs = cache[func] - if funcArgs == nil then - funcArgs = getFuncArgs(func) or false - local refs = vm.getRefs(func) - for _, ref in ipairs(refs) do - cache[ref] = funcArgs - end - end + local funcArgs = getFuncArgs(func) if not funcArgs then return diff --git a/script/proto/define.lua b/script/proto/define.lua index b5e40c60..f2ee7ab5 100644 --- a/script/proto/define.lua +++ b/script/proto/define.lua @@ -124,7 +124,7 @@ m.DiagnosticDefaultNeededFileStatus = { ['close-non-object'] = 'Any', ['count-down-loop'] = 'Any', ['no-implicit-any'] = 'None', - ['deprecated'] = 'Any', + ['deprecated'] = 'Opened', ['duplicate-doc-class'] = 'Any', ['undefined-doc-class'] = 'Any', -- cgit v1.2.3