Skip to content

Commit

Permalink
test: fix luacheck warnings in test/sql-tap (W212)
Browse files Browse the repository at this point in the history
W212 (Unused argument)

Part of #5464
  • Loading branch information
ligurio committed Jan 20, 2021
1 parent 8ca1cbe commit dd6fc16
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .luacheckrc
Expand Up @@ -57,8 +57,6 @@ files["test/sql-tap/**/*.lua"] = {
ignore = {
-- Accessing an undefined global variable.
"113",
-- Unused argument.
"212",
-- Unused loop variable.
"213",
-- Local variable is set but never accessed.
Expand Down
2 changes: 1 addition & 1 deletion test/sql-tap/analyze5.test.lua
Expand Up @@ -25,7 +25,7 @@ local function eqp(sql)
return test:execsql("EXPLAIN QUERY PLAN"..sql)
end

local function alpha(blob)
local function alpha()
local ret = ""
for _, c in ipairs(X(37, "X!cmd", [=[["split",["blob"],""]]=])) do
if X(39, "X!cmd", [=[["string","is","alpha",["c"]]]=])
Expand Down
2 changes: 1 addition & 1 deletion test/sql-tap/e_expr.test.lua
Expand Up @@ -1077,7 +1077,7 @@ test:do_execsql_test(
--
-- MUST_WORK_TEST prepared statements
if (0>0) then
local function parameter_test(tn, sql, params, result)
local function parameter_test(tn, sql, params, result) -- luacheck: no unused args
local stmt = sql_prepare_v2("db", sql, -1)
for _ in X(0, "X!foreach", [=[["number name",["params"]]]=]) do
X(480, "X!cmd", [=[["do_test",[["tn"],".name.",["number"]],[["list","set","",["nm"]]],["name"]]]=])
Expand Down
2 changes: 1 addition & 1 deletion test/sql-tap/identifier-characters.test.lua
Expand Up @@ -65,7 +65,7 @@ local testcases = {
test:execsql("commit")
if ok == false then error(res) end
end,
function (id) end},
function () end},
{"trigger name",
function (id)
test:execsql(string.format([[
Expand Down
2 changes: 1 addition & 1 deletion test/sql-tap/lua/sqltester.lua
Expand Up @@ -176,7 +176,7 @@ local function execsql(self, sql)
end
test.execsql = execsql

local function catchsql(self, sql, expect)
local function catchsql(self, sql)
local r = {pcall(execsql, self, sql) }
if r[1] == true then
r[1] = 0
Expand Down
2 changes: 1 addition & 1 deletion test/sql-tap/sort.test.lua
Expand Up @@ -760,7 +760,7 @@ test:do_execsql_test(
--
-- MUST_WORK_TEST? special sql functions (sql_soft_heap_limit, sql_test_control...)
if (0 > 0) then
local function cksum(x)
local function cksum()
local i1 = 1
local i2 = 2
X(503, "X!cmd", [=[["binary","scan",["x"],"c*","L"]]=])
Expand Down

0 comments on commit dd6fc16

Please sign in to comment.