[Tarantool-patches] [PATCH v8 11/14] test: fix luacheck warnings W542 in test/sql-tap
sergeyb at tarantool.org
sergeyb at tarantool.org
Thu Jan 21 15:50:13 MSK 2021
From: Sergey Bronnikov <sergeyb at tarantool.org>
W542 (An empty if branch)
Part of #5464
---
.luacheckrc | 2 --
test/sql-tap/selectA.test.lua | 8 --------
test/sql-tap/selectB.test.lua | 2 ++
test/sql-tap/tkt-91e2e8ba6f.test.lua | 3 ---
test/sql-tap/tkt-9a8b09f8e6.test.lua | 3 ---
test/sql-tap/tkt3493.test.lua | 3 ---
test/sql-tap/with1.test.lua | 1 +
7 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/.luacheckrc b/.luacheckrc
index 53c5de34d..98e7cb9bb 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -51,8 +51,6 @@ exclude_files = {
files["test/sql-tap/**/*.lua"] = {
ignore = {
- -- An empty if branch.
- "542",
-- A line consists of nothing but whitespace.
"611",
-- A line contains trailing whitespace.
diff --git a/test/sql-tap/selectA.test.lua b/test/sql-tap/selectA.test.lua
index db4d03985..af38b5007 100755
--- a/test/sql-tap/selectA.test.lua
+++ b/test/sql-tap/selectA.test.lua
@@ -76,9 +76,6 @@ test:do_execsql_test(
})
-- MUST_WORK_TEST
-if (0 > 0)
- then
-end
test:do_execsql_test(
"selectA-2.1",
[[
@@ -2353,11 +2350,6 @@ test:do_execsql_test(
-- At one point the following code exposed a temp register reuse problem.
--
-- MUST_WORK_TEST
--- TODO stored procedures are not supported by now
-if (0 > 0)
- then
-end
-
-- TODO stored procedures are not supported by now
--db("func", "f", "f")
test:do_execsql_test(
diff --git a/test/sql-tap/selectB.test.lua b/test/sql-tap/selectB.test.lua
index 6c7bc805a..f1f43af76 100755
--- a/test/sql-tap/selectB.test.lua
+++ b/test/sql-tap/selectB.test.lua
@@ -212,6 +212,7 @@ test:do_execsql_test(
for ii = 3, 6, 1 do
if ii == 4 then
+ assert(ii == 4) -- added to pass luacheck
-- TODO
--X(2, "X!cmd", [=[["optimization_control","db","query-flattener","off"]]=])
elseif ii == 5 then
@@ -232,6 +233,7 @@ for ii = 3, 6, 1 do
})
elseif ii == 6 then
+ assert(ii == 6) -- added to pass luacheck
--X(2, "X!cmd", [=[["optimization_control","db","query-flattener","off"]]=])
end
test:do_execsql_test(
diff --git a/test/sql-tap/tkt-91e2e8ba6f.test.lua b/test/sql-tap/tkt-91e2e8ba6f.test.lua
index a72b8d957..dac546f10 100755
--- a/test/sql-tap/tkt-91e2e8ba6f.test.lua
+++ b/test/sql-tap/tkt-91e2e8ba6f.test.lua
@@ -81,9 +81,6 @@ test:do_execsql_test(
})
-- MUST_WORK_TEST
-if (0 > 0)
- then
-end
test:do_execsql_test(
1.7,
[[
diff --git a/test/sql-tap/tkt-9a8b09f8e6.test.lua b/test/sql-tap/tkt-9a8b09f8e6.test.lua
index 3fbc1ce37..1e5246353 100755
--- a/test/sql-tap/tkt-9a8b09f8e6.test.lua
+++ b/test/sql-tap/tkt-9a8b09f8e6.test.lua
@@ -21,9 +21,6 @@ test:plan(47)
-- ["set","testdir",[["file","dirname",["argv0"]]]]
-- ["source",[["testdir"],"\/tester.tcl"]]
-- MUST_WORK_TEST
-if (0 > 0)
- then
-end
test:do_execsql_test(
1.1,
[[
diff --git a/test/sql-tap/tkt3493.test.lua b/test/sql-tap/tkt3493.test.lua
index 78e465b00..9387c5207 100755
--- a/test/sql-tap/tkt3493.test.lua
+++ b/test/sql-tap/tkt3493.test.lua
@@ -255,9 +255,6 @@ test:do_execsql_test(
})
-- MUST_WORK_TEST
-if (0 > 0)
- then
-end
test:do_execsql_test(
"tkt3493-3.2.1",
[[
diff --git a/test/sql-tap/with1.test.lua b/test/sql-tap/with1.test.lua
index 89a427ecc..32e187186 100755
--- a/test/sql-tap/with1.test.lua
+++ b/test/sql-tap/with1.test.lua
@@ -631,6 +631,7 @@ local function limit_test(tn, iLimit, iOffset)
end
-- if X(0, "X!expr01", [["$iLimit < 0 "]]) then
if iLimit < 0 then
+ assert(iLimit < 0) -- added to pass luacheck
-- result = X(467, "X!cmd", [=[["lrange",["::I"],["iOffset"],"end"]]=])
-- last is 20
else
--
2.25.1
More information about the Tarantool-patches
mailing list