diff options
Diffstat (limited to 'server-beta/src/core/diagnostics/unused-vararg.lua')
-rw-r--r-- | server-beta/src/core/diagnostics/unused-vararg.lua | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/server-beta/src/core/diagnostics/unused-vararg.lua b/server-beta/src/core/diagnostics/unused-vararg.lua deleted file mode 100644 index 74cc08e7..00000000 --- a/server-beta/src/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 |