Skip to content

Commit

Permalink
test: fix luacheck warnings in test/sql-tap (W511)
Browse files Browse the repository at this point in the history
W511 (Unreachable code)

Part of #5464
  • Loading branch information
ligurio committed Jan 20, 2021
1 parent e782c3a commit 79f5b45
Show file tree
Hide file tree
Showing 6 changed files with 10 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",
-- Unreachable code.
"511",
-- Loop can be executed at most once.
"512",
-- An empty if branch.
Expand Down
3 changes: 2 additions & 1 deletion test/sql-tap/date.test.lua
Expand Up @@ -29,7 +29,8 @@ test:plan(0)

-- Disabled until #3694 is resolved.
--
if false then
local is_gh_3694_closed = false
if is_gh_3694_closed then
local function datetest(tnum, expr, result)
test:do_test(
"date-"..tnum,
Expand Down
3 changes: 2 additions & 1 deletion test/sql-tap/select1.test.lua
Expand Up @@ -1513,7 +1513,8 @@ test:do_execsql_test(
-- TODO: This test is failing because f1 is now being loaded off the
-- disk as a vdbe integer, not a string. Hence the value of f1/(f1-11)
-- changes because of rounding. Disable the test for now.
if false
local is_gh_5737_closed = false
if is_gh_5737_closed
then
test:do_execsql_test(
"select1-8.4",
Expand Down
3 changes: 2 additions & 1 deletion test/sql-tap/table.test.lua
Expand Up @@ -947,7 +947,8 @@ test:do_execsql_test(
--
-- Disabled until #3694 is resolved.
--
if false then
local is_gh_3694_closed = false
if is_gh_3694_closed then
test:do_execsql_test(
"table-13.1",
[[
Expand Down
3 changes: 2 additions & 1 deletion test/sql-tap/tkt-bd484a090c.test.lua
Expand Up @@ -21,7 +21,8 @@ test:plan(0)

-- Disabled until #3694 is resolved.
--
if false then
local is_gh_3694_closed = false
if is_gh_3694_closed then
test:do_test(
1.1,
function()
Expand Down
3 changes: 2 additions & 1 deletion test/sql-tap/tkt2192.test.lua
Expand Up @@ -26,7 +26,8 @@ test:plan(4)

-- Disabled until #3694 is resolved.
--
if false then
local is_gh_3694_closed = false
if is_gh_3694_closed then
test:do_execsql_test(
"tkt2192-1.1",
[[
Expand Down

0 comments on commit 79f5b45

Please sign in to comment.