[Tarantool-patches] [PATCH] Fix luacheck warnings in src/lua/*.lua

Sergey Bronnikov sergeyb at tarantool.org
Mon Apr 6 12:33:43 MSK 2020


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@


More information about the Tarantool-patches mailing list