summaryrefslogtreecommitdiff
path: root/test/full/self.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-28 16:50:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-28 16:59:23 +0800
commit2d5b2cbfa492e80841d4e8822106434f7ee4f303 (patch)
treea962420c73f31ee200ac2081c3fa3203b29e7fc8 /test/full/self.lua
parente0ff9a81c623efc1882b1fd4fad8389c7fa3ca63 (diff)
downloadlua-language-server-2d5b2cbfa492e80841d4e8822106434f7ee4f303.zip
add `vm.getDefFields`
Diffstat (limited to 'test/full/self.lua')
-rw-r--r--test/full/self.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/full/self.lua b/test/full/self.lua
new file mode 100644
index 00000000..247702ae
--- /dev/null
+++ b/test/full/self.lua
@@ -0,0 +1,29 @@
+local files = require 'files'
+local fsu = require 'fs-utility'
+local furi = require 'file-uri'
+local diag = require 'provider.diagnostic'
+local config = require 'config'
+files.removeAll()
+
+fsu.scanDirectory(ROOT, function (path)
+ if path:extension():string() ~= '.lua' then
+ return
+ end
+ local uri = furi.encode(path:string())
+ local text = fsu.loadFile(path)
+ files.setText(uri, text)
+ files.open(uri)
+end)
+
+config.config.diagnostics.disable['undefined-field'] = true
+config.config.diagnostics.disable['redundant-parameter'] = true
+diag.start()
+
+local clock = os.clock()
+
+for uri in files.eachFile() do
+ diag.doDiagnostic(uri)
+end
+
+local passed = os.clock() - clock
+print('基准全量诊断用时:', passed)