summaryrefslogtreecommitdiff
path: root/script-beta/core/diagnostics/unused-vararg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core/diagnostics/unused-vararg.lua')
-rw-r--r--script-beta/core/diagnostics/unused-vararg.lua31
1 files changed, 0 insertions, 31 deletions
diff --git a/script-beta/core/diagnostics/unused-vararg.lua b/script-beta/core/diagnostics/unused-vararg.lua
deleted file mode 100644
index 74cc08e7..00000000
--- a/script-beta/core/diagnostics/unused-vararg.lua
+++ /dev/null
@@ -1,31 +0,0 @@
-local files = require 'files'
-local guide = require 'parser.guide'
-local define = require 'proto.define'
-local lang = require 'language'
-
-return function (uri, callback)
- local ast = files.getAst(uri)
- if not ast then
- return
- end
-
- guide.eachSourceType(ast.ast, 'function', function (source)
- local args = source.args
- if not args then
- return
- end
-
- for _, arg in ipairs(args) do
- if arg.type == '...' then
- if not arg.ref then
- callback {
- start = arg.start,
- finish = arg.finish,
- tags = { define.DiagnosticTag.Unnecessary },
- message = lang.script.DIAG_UNUSED_VARARG,
- }
- end
- end
- end
- end)
-end