[Tarantool-patches] [PATCH 6/6] Fix luacheck warnings in src/box/lua/
Sergey Bronnikov
sergeyb at tarantool.org
Thu Jun 18 12:37:03 MSK 2020
Hi,
On 15:01 Thu 11 Jun , Sergey Bronnikov wrote:
<snipped>
> > > diff --git a/src/box/lua/net_box.lua b/src/box/lua/net_box.lua
> > > index 9560bfdd4..f71744014 100644
> > > --- a/src/box/lua/net_box.lua
> > > +++ b/src/box/lua/net_box.lua
> > > @@ -187,7 +183,7 @@ local function next_id(id) return band(id + 1, 0x7FFFFFFF) end
> > > -- @retval two non-nils A connected socket and a decoded greeting.
> > > --
> > > local function establish_connection(host, port, timeout)
> > > - local timeout = timeout or DEFAULT_CONNECT_TIMEOUT
> > > + timeout = timeout or DEFAULT_CONNECT_TIMEOUT
> >
> > 2. Unnecessary diff. I reverted this line and nothing changed.
>
> change is required, see [1]
>
> src/box/lua/net_box.lua:186:11: variable timeout was previously defined as an argument on line 185
>
> 1. https://gitlab.com/tarantool/tarantool/-/jobs/589857153
I was wrong here, change has been reverted.
<snipped>
> > > diff --git a/src/box/lua/tuple.lua b/src/box/lua/tuple.lua
> > > index f97aa1579..87f53258b 100644
> > > --- a/src/box/lua/tuple.lua
> > > +++ b/src/box/lua/tuple.lua
> > > @@ -232,7 +230,7 @@ local function tuple_update(tuple, expr)
> > > error("Usage: tuple:update({ { op, field, arg}+ })")
> > > end
> > > local pexpr, pexpr_end = tuple_encode(expr)
> > > - local tuple = builtin.box_tuple_update(tuple, pexpr, pexpr_end)
> > > + tuple = builtin.box_tuple_update(tuple, pexpr, pexpr_end)
> >
> > 5. Ditto.
>
> change is required, see [1]
>
> 1. https://gitlab.com/tarantool/tarantool/-/jobs/589857153
I was wrong here, change has been reverted.
> > > if tuple == nil then
> > > return box.error()
> > > end
> > > @@ -245,7 +243,7 @@ local function tuple_upsert(tuple, expr)
> > > error("Usage: tuple:upsert({ { op, field, arg}+ })")
> > > end
> > > local pexpr, pexpr_end = tuple_encode(expr)
> > > - local tuple = builtin.box_tuple_upsert(tuple, pexpr, pexpr_end)
> > > + tuple = builtin.box_tuple_upsert(tuple, pexpr, pexpr_end)
> >
> > 6. Ditto.
>
> change is required, see [1]
>
> 1. https://gitlab.com/tarantool/tarantool/-/jobs/589857153
I was wrong here, change has been reverted.
<snipped>
More information about the Tarantool-patches
mailing list