[Tarantool-patches] [PATCH 11/19] Fix luacheck warnings in test/sql
sergeyb at tarantool.org
sergeyb at tarantool.org
Thu Jul 16 17:11:40 MSK 2020
From: Sergey Bronnikov <sergeyb at tarantool.org>
Part of #4681
Reviewed-by: Vladislav Shpilevoy <v.shpilevoy at tarantool.org>
Reviewed-by: Igor Munkin <imun at tarantool.org>
---
.luacheckrc | 36 +++++++++++++++++++++++++++++++++-
test/sql/lua/sql_tokenizer.lua | 2 +-
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/.luacheckrc b/.luacheckrc
index 789958fc8..646c844d6 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -45,7 +45,7 @@ exclude_files = {
"test/engine_long/*.test.lua",
"test/replication/*.test.lua",
"test/sql-tap/**/*.lua",
- "test/sql/**/*.lua",
+ "test/sql/*.test.lua",
"test/swim/**/*.lua",
"test/var/**/*.lua",
"test/vinyl/**/*.lua",
@@ -202,3 +202,37 @@ files["test/replication/lua/fast_replica.lua"] = {
"wait_all",
},
}
+files["test/sql-tap/*.lua"] = {
+ ignore = {
+ -- Setting an undefined global variable.
+ -- https://github.com/tarantool/tarantool/issues/5173
+ "111",
+ -- Accessing an undefined global variable.
+ -- https://github.com/tarantool/tarantool/issues/5174
+ "113",
+ -- Unused local variable.
+ -- https://github.com/tarantool/tarantool/issues/5175
+ "211",
+ -- A line consists of nothing but whitespace.
+ -- https://github.com/tarantool/tarantool/issues/5176
+ "611",
+ -- A line contains trailing whitespace.
+ -- https://github.com/tarantool/tarantool/issues/5177
+ "612",
+ -- Trailing whitespace in a string.
+ -- https://github.com/tarantool/tarantool/issues/5178
+ "613",
+ -- Trailing whitespace in a comment.
+ -- https://github.com/tarantool/tarantool/issues/5179
+ "614",
+ -- Inconsistent indentation (SPACE followed by TAB).
+ -- https://github.com/tarantool/tarantool/issues/5180
+ "621",
+ -- Line is too long.
+ -- https://github.com/tarantool/tarantool/issues/5181
+ "631"
+ }
+}
+files["test/sql-tap/lua/sqltester.lua"] = {
+ globals = {"table_match_regex_p"}
+}
diff --git a/test/sql/lua/sql_tokenizer.lua b/test/sql/lua/sql_tokenizer.lua
index 9922d792d..ffe4fb4e8 100644
--- a/test/sql/lua/sql_tokenizer.lua
+++ b/test/sql/lua/sql_tokenizer.lua
@@ -134,7 +134,7 @@ end
-- @retval Token type. If the rest of the SQL request consists of
-- spaces and comments, then return TK_EMPTY.
local function get_next_token(context)
- local c = ''
+ local c
repeat
local i = context.offset
c = context.sql:sub(i, i)
--
2.26.2
More information about the Tarantool-patches
mailing list