[Tarantool-patches] [PATCH 1/6] Fix luacheck warnings in src/lua/

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Wed Apr 15 02:29:23 MSK 2020


Thanks for the patch!

Consider more fixes below and on the branch in a separate commit.
That allowed to remove some warning mutes from the luacheck
config.

====================

    Review fixes: src/lua

diff --git a/src/lua/fiber.lua b/src/lua/fiber.lua
index 89c17f63d..692408e54 100644
--- a/src/lua/fiber.lua
+++ b/src/lua/fiber.lua
@@ -40,7 +40,7 @@ fiber.stall = nil
 
 local worker_next_task = nil
 local worker_last_task = nil
-local worker_fiber = nil
+local worker_fiber
 
 --
 -- Worker is a singleton fiber for not urgent delayed execution of
diff --git a/src/lua/help.lua b/src/lua/help.lua
index 54ff1b5d0..f4041d4a4 100644
--- a/src/lua/help.lua
+++ b/src/lua/help.lua
@@ -11,9 +11,6 @@ help = { doc.help }
 tutorial = {}
 tutorial[1] = help[1]
 
-local help_function_data = {};
-local help_object_data = {}
-
 local function help_call(table, param)
     return help
 end
diff --git a/src/lua/msgpackffi.lua b/src/lua/msgpackffi.lua
index 9105c3f23..793f47854 100644
--- a/src/lua/msgpackffi.lua
+++ b/src/lua/msgpackffi.lua
@@ -501,7 +501,11 @@ local ext_decoder = {
     -- MP_DECIMAL
     [1] = function(data, len) local num = ffi.new("decimal_t") builtin.decimal_unpack(data, len, num) return num end,
     -- MP_UUID
-    [2] = function(data, len) local uuid = ffi.new("struct tt_uuid") builtin.uuid_unpack(data, len, uuid) return uuid end,
+    [2] = function(data, len)
+        local uuid = ffi.new("struct tt_uuid")
+        builtin.uuid_unpack(data, len, uuid)
+        return uuid
+    end,
 }
 
 local function decode_ext(data)


More information about the Tarantool-patches mailing list