summaryrefslogtreecommitdiff
path: root/script-beta/core
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core')
-rw-r--r--script-beta/core/diagnostics/unused-function.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/script-beta/core/diagnostics/unused-function.lua b/script-beta/core/diagnostics/unused-function.lua
index 2bf3084a..f0bca613 100644
--- a/script-beta/core/diagnostics/unused-function.lua
+++ b/script-beta/core/diagnostics/unused-function.lua
@@ -10,15 +10,14 @@ return function (uri, callback)
if not ast then
return
end
- -- 只检查局部函数与全局函数
+ -- 只检查局部函数
guide.eachSourceType(ast.ast, 'function', function (source)
local parent = source.parent
if not parent then
return
end
if parent.type ~= 'local'
- and parent.type ~= 'setlocal'
- and parent.type ~= 'setglobal' then
+ and parent.type ~= 'setlocal' then
return
end
local hasGet