summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/common.lua7
-rw-r--r--test/diagnostics/type-check.lua2
2 files changed, 9 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index e899c0c4..7c2ffb60 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -1149,6 +1149,8 @@ return m
]]
TEST [[
+---@meta
+
---@class A
---@field a boolean
@@ -1769,6 +1771,8 @@ function t:init() end
]]
TEST [[
+---@meta
+
return function f(x, y, z) end
]]
@@ -1816,6 +1820,8 @@ end
]]
TEST [[
+---@meta
+
---@return number, number
local function r2() end
@@ -2057,6 +2063,7 @@ local _ <close> = t
]]
TEST [[
+---@meta
---@diagnostic disable: duplicate-set-field
---@class A
local m = {}
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua
index 6455cd66..f0133501 100644
--- a/test/diagnostics/type-check.lua
+++ b/test/diagnostics/type-check.lua
@@ -3,6 +3,7 @@ local config = require 'config'
config.add(nil, 'Lua.diagnostics.disable', 'unused-local')
config.add(nil, 'Lua.diagnostics.disable', 'unused-function')
config.add(nil, 'Lua.diagnostics.disable', 'undefined-global')
+config.add(nil, 'Lua.diagnostics.disable', 'missing-return')
config.set(nil, 'Lua.type.castNumberToInteger', false)
TEST [[
@@ -867,4 +868,5 @@ t.x = 1
config.remove(nil, 'Lua.diagnostics.disable', 'unused-local')
config.remove(nil, 'Lua.diagnostics.disable', 'unused-function')
config.remove(nil, 'Lua.diagnostics.disable', 'undefined-global')
+config.remove(nil, 'Lua.diagnostics.disable', 'missing-return')
config.set(nil, 'Lua.type.castNumberToInteger', true)