From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6D06F4696C3 for ; Wed, 15 Apr 2020 23:59:01 +0300 (MSK) Date: Wed, 15 Apr 2020 23:51:54 +0300 From: Igor Munkin Message-ID: <20200415205154.GG8314@tarantool.org> References: <56290abaaa1850a223eac0fa7165bcb9f890501d.1586849129.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 1/6] Fix luacheck warnings in src/lua/ List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org Vlad, Thanks for the fixes! On 15.04.20, Vladislav Shpilevoy wrote: > 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 It looks like this assignment can also be omitted (anyway luacheck also reports it as a warning). > -local worker_fiber = nil > +local worker_fiber > > -- > -- Worker is a singleton fiber for not urgent delayed execution of > 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, I guess MP_DECIMAL decoder can also be transformed to multiline function. > -- 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) -- Best regards, IM