Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov <sergeyb@tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org,
	Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v5 07/10] Fix luacheck warnings in src/box/lua/
Date: Thu, 28 May 2020 14:19:57 +0300	[thread overview]
Message-ID: <20200528111957.GD5970@pony.bronevichok.ru> (raw)
In-Reply-To: <20200527165431.GB21558@tarantool.org>

Igor, thanks for review!
All issues mentioned below fixed in a branch.

On 19:54 Wed 27 May , Igor Munkin wrote:
> Sergey,
> 
> Thanks, the patch LGTM except several nits I left below.
> 
> On 12.05.20, sergeyb@tarantool.org wrote:
> > From: Sergey Bronnikov <sergeyb@tarantool.org>
> > 
> > Closes #4681
> > 
> > Reviewed-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
> > Co-authored-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
> > ---
> >  src/box/lua/console.lua         |  6 ++--
> >  src/box/lua/feedback_daemon.lua |  2 +-
> >  src/box/lua/key_def.lua         |  2 +-
> >  src/box/lua/load_cfg.lua        | 31 ++++++++++---------
> >  src/box/lua/net_box.lua         | 53 +++++++++++++--------------------
> >  src/box/lua/schema.lua          | 50 +++++++++++++++----------------
> >  src/box/lua/tuple.lua           |  8 ++---
> >  src/box/lua/upgrade.lua         | 19 ++++++------
> >  8 files changed, 78 insertions(+), 93 deletions(-)
> > 
> 
> <snipped>
> 
> > diff --git a/src/box/lua/net_box.lua b/src/box/lua/net_box.lua
> > index 9560bfdd4..3f2a9df81 100644
> > --- a/src/box/lua/net_box.lua
> > +++ b/src/box/lua/net_box.lua
> 
> <snipped>
> 
> > @@ -253,7 +249,7 @@ local function on_push_sync_default(...) end
> >  --
> >  -- The following events are delivered, with arguments:
> >  --
> > ---  'state_changed', state, errno, error
> > +--  'state_changed', state, errno
> 
> Typo: s/errno/error/ since you removed the third argument.
> 
> >  --  'handshake', greeting -> nil (accept) / errno, error (reject)
> >  --  'will_fetch_schema'   -> true (approve) / false (skip fetch)
> >  --  'did_fetch_schema', schema_version, spaces, indices
> 
> <snipped>
> 
> > @@ -795,13 +791,12 @@ local function create_transport(host, port, user, password, callback,
> >              return iproto_schema_sm()
> >          end
> >          encode_auth(send_buf, new_request_id(), user, password, salt)
> > -        local err, hdr, body_rpos, body_end = send_and_recv_iproto()
> > +        local err, hdr, body_rpos = send_and_recv_iproto()
> >          if err then
> >              return error_sm(err, hdr)
> >          end
> >          if hdr[IPROTO_STATUS_KEY] ~= 0 then
> > -            local body
> > -            body, body_end = decode(body_rpos)
> > +            local body, _ = decode(body_rpos)
> 
> Underscore variable is excess here (see v4 review[1]).
> 
> >              return error_sm(E_NO_CONNECTION, body[IPROTO_ERROR_24])
> >          end
> >          set_state('fetch_schema')
> > @@ -852,8 +847,7 @@ local function create_transport(host, port, user, password, callback,
> >                          peer_has_vcollation = false
> >                          goto continue
> >                      end
> > -                    local body
> > -                    body, body_end = decode(body_rpos)
> > +                    local body, _ = decode(body_rpos)
> 
> Underscore variable is excess here (see v4 review[1]).
> 
> >                      return error_sm(E_NO_CONNECTION, body[IPROTO_ERROR_24])
> >                  end
> >                  if schema_version == nil then
> 
> <snipped>
> 
> > -- 
> > 2.23.0
> > 
> 
> [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-April/016316.html
> 
> -- 
> Best regards,
> IM

  reply	other threads:[~2020-05-28 11:20 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12  9:49 [Tarantool-patches] [PATCH v5 00/10] Add static analysis with luacheck sergeyb
2020-05-12  9:49 ` [Tarantool-patches] [PATCH v5 01/10] Add initial luacheck config sergeyb
2020-05-26 22:15   ` Igor Munkin
2020-05-28 15:31     ` Sergey Bronnikov
2020-05-28 16:07       ` Sergey Bronnikov
2020-05-29 11:20         ` Igor Munkin
2020-11-10 14:30           ` Sergey Bronnikov
2020-11-10 14:49             ` Igor Munkin
2020-05-12  9:49 ` [Tarantool-patches] [PATCH v5 02/10] gitlab-ci: enable static analysis with luacheck sergeyb
2020-05-13 14:15   ` Alexander V. Tikhonov
2020-05-13 14:40     ` Sergey Bronnikov
2020-05-26 22:39   ` Igor Munkin
2020-05-28 10:03     ` Sergey Bronnikov
2020-05-12  9:49 ` [Tarantool-patches] [PATCH v5 03/10] Fix luacheck warnings in extra/dist/tarantoolctl.in sergeyb
2020-05-26 23:11   ` Igor Munkin
2020-05-28 10:13     ` Sergey Bronnikov
2020-05-12  9:49 ` [Tarantool-patches] [PATCH v5 04/10] Fix luacheck warnings in src/lua/ sergeyb
2020-05-27 11:22   ` Igor Munkin
2020-05-28 12:22     ` Sergey Bronnikov
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 05/10] " sergeyb
2020-05-13 11:13   ` Sergey Bronnikov
2020-05-27 11:22   ` Igor Munkin
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 06/10] Fix luacheck warnings in src/box/lua/ sergeyb
2020-05-27 16:54   ` Igor Munkin
2020-05-28 15:16     ` Sergey Bronnikov
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 07/10] " sergeyb
2020-05-13 11:14   ` Sergey Bronnikov
2020-05-27 16:54   ` Igor Munkin
2020-05-28 11:19     ` Sergey Bronnikov [this message]
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 08/10] Fix luacheck warnings in test/ sergeyb
2020-05-29 11:08   ` Igor Munkin
2020-05-29 14:08     ` Sergey Bronnikov
2020-05-12  9:50 ` [Tarantool-patches] [PATCH v5 09/10] Add luacheck supressions for luajit tests sergeyb
2020-05-26 20:45   ` Igor Munkin
2020-05-28 19:25     ` Sergey Bronnikov
2020-05-12 12:28 ` [Tarantool-patches] [PATCH 10/10] build: Enable 'make luacheck' target Sergey Bronnikov
2020-05-26 20:45   ` Igor Munkin
2020-05-28  9:59     ` Sergey Bronnikov
2020-05-26 20:38 ` [Tarantool-patches] [PATCH v5 11/10] test: fix warnings spotted by luacheck sergeyb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200528111957.GD5970@pony.bronevichok.ru \
    --to=sergeyb@tarantool.org \
    --cc=imun@tarantool.org \
    --cc=o.piskunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v5 07/10] Fix luacheck warnings in src/box/lua/' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox