[Tarantool-patches] [PATCH v8 07/14] test: fix luacheck warnings W231 in test/sql-tap

sergeyb at tarantool.org sergeyb at tarantool.org
Thu Jan 21 15:50:05 MSK 2021


From: Sergey Bronnikov <sergeyb at tarantool.org>

W231 (Local variable is set but never accessed)

Part of #5464
---
 .luacheckrc                  |  2 --
 test/sql-tap/e_expr.test.lua | 19 -------------------
 2 files changed, 21 deletions(-)

diff --git a/.luacheckrc b/.luacheckrc
index 2e33cc05e..bfce2a6b4 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -51,8 +51,6 @@ exclude_files = {
 
 files["test/sql-tap/**/*.lua"] = {
     ignore = {
-        -- Local variable is set but never accessed.
-        "231",
         -- "Value assigned to a local variable is unused."
         "311",
         -- Unreachable code.
diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua
index 5f8b206d3..b488bdc60 100755
--- a/test/sql-tap/e_expr.test.lua
+++ b/test/sql-tap/e_expr.test.lua
@@ -2486,10 +2486,6 @@ test:do_execsql_test(
         -- </e_expr-20.2>
     })
 
-local a, b, c
-a = 0
-b = 0
-c = 0
 local varlist = {  }
 local function var(nm)
     table.insert(varlist,nm)
@@ -2554,9 +2550,6 @@ test:do_test(
 -- evaluation of the THEN expression that corresponds to the first WHEN
 -- expression that evaluates to true.
 --
-a = 0
-b = 1
-c = 0
 test:do_execsql_test(
     "e_expr-21.2.1",
     [[
@@ -2570,9 +2563,6 @@ test:do_execsql_test(
         "B"
         -- </e_expr-21.2.1>
     })
-a = 0
-b = 1
-c = 1
 test:do_execsql_test(
     "e_expr-21.2.2",
     [[
@@ -2586,9 +2576,6 @@ test:do_execsql_test(
         "B"
         -- </e_expr-21.2.2>
     })
-a = 0
-b = 0
-c = 1
 test:do_execsql_test(
     "e_expr-21.2.3",
     [[
@@ -2607,9 +2594,6 @@ test:do_execsql_test(
 -- evaluate to true, the result of evaluating the ELSE expression, if
 -- any.
 --
-a = 0
-b = 0
-c = 0
 test:do_execsql_test(
     "e_expr-21.3.1",
     [[
@@ -2846,9 +2830,6 @@ test:do_execsql_test(
 -- or short-circuit, evaluation.
 --
 varlist = {}
-a = "0"
-b = "1"
-c = "0"
 test:do_execsql_test(
     "e_expr-25.1.1",
     [[
-- 
2.25.1



More information about the Tarantool-patches mailing list