From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp5.mail.ru (smtp5.mail.ru [94.100.179.24]) (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 C42D14696C3 for ; Mon, 6 Apr 2020 12:33:47 +0300 (MSK) Date: Mon, 6 Apr 2020 12:33:43 +0300 From: Sergey Bronnikov Message-ID: <20200406093343.GB20529@pony.bronevichok.ru> References: <20200403093902.GA42848@pony.bronevichok.ru> <141ac7a3-45c6-a720-a400-d3d699443550@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <141ac7a3-45c6-a720-a400-d3d699443550@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] Fix luacheck warnings in src/lua/*.lua List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Oleg Babin , tarantool-patches@dev.tarantool.org, avtikhon@tarantool.org, alexander.turenko@tarantool.org, o.piskunov@tarantool.org Hi, Oleg! comments inline On 17:21 Fri 03 Apr , Oleg Babin wrote: > Hi! Thanks for your patch! > > I think not only "src/lua/*.lua" should be checked but also > "src/box/lua/*.lua". Yep, I remember about Lua code in other directories. This commit a first step in this direction. Patches for src/box and test/ will follow, subscribe to issue https://github.com/tarantool/tarantool/issues/4681 if you are interested. > Also see one comment. > > On 03/04/2020 12:39, Sergey Bronnikov wrote: > > diff --git a/src/lua/tap.lua b/src/lua/tap.lua > > index 94b080d5a..04497386e 100644 > > --- a/src/lua/tap.lua > > +++ b/src/lua/tap.lua > > @@ -53,7 +53,7 @@ local function ok(test, cond, message, extra) > > io.write(string.format("not ok - %s\n", message)) > > extra = extra or {} > > if test.trace then > > - local frame = debug.getinfo(3, "Sl") > > + debug.getinfo(3, "Sl") > > I think debug.getinfo() could be completely removed. It doesn't change any > state it only returns some debug information that is completely unused. This patch is about fixing warnings produced by luacheck, Proposed change doesn't relate to Lua static analysis, so I suggest to make it in a separate patch. > --- > Oleg Babin -- sergeyb@