From: Sergey Bronnikov <sergeyb@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: alexander.turenko@tarantool.org, tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 5/6] Fix luacheck warnings in src/lua/
Date: Thu, 18 Jun 2020 12:32:14 +0300 [thread overview]
Message-ID: <20200618093214.GB89732@pony.bronevichok.ru> (raw)
In-Reply-To: <f1495390-8622-ecd0-604f-6ffc8142e169@tarantool.org>
Hi,
On 21:52 Thu 11 Jun , Vladislav Shpilevoy wrote:
> Thanks for the fixes!
>
> >>> + },
> >>> +}
> >>> diff --git a/src/lua/argparse.lua b/src/lua/argparse.lua
> >>> index faa0ae130..6c8f10fc1 100644
> >>> --- a/src/lua/argparse.lua
> >>> +++ b/src/lua/argparse.lua
> >>> @@ -91,7 +91,8 @@ local function convert_parameter(name, convert_from, convert_to)
> >>> end
> >>>
> >>> local function parameters_parse(t_in, options)
> >>> - local t_out, t_in = {}, t_in or {}
> >>> + local t_out = {}
> >>> + t_in = t_in or {}
> >>
> >> 6. Unnecessary diff. At least when I check on top of the branch.
> >
> > change is required, see [1]
> >
> > 1. https://gitlab.com/tarantool/tarantool/-/jobs/589857153
>
> It reports error 412. It is suppressed globally in .luacheckrc. How
> is it possible? I tried it locally, and the warning is not reported.
> In the job I see that the .luacheck file is outdated - it does not
> contain 412 suppression:
> https://gitlab.com/tarantool/tarantool/-/blob/b435c7d040c7ce160d67afde270c336f1b91fddb/.luacheckrc
>
> While on the branch in github the warning is suppressed.
>
> So the diff is unnecessary, after all. Unless the github branch is
> outdated.
> https://github.com/tarantool/tarantool/blob/ligurio/gh-4681-fix-luacheck-warnings-src/.luacheckrc#L15
>
> The same for all the other places, where you said the change is required.
> In the other commits too.
I'm so sorry, I was wrong and all your suggested diffs have been applied.
> >>> local stop = fiber.clock() + timeout
> >>> local dns = getaddrinfo(host, port, timeout, { type = 'SOCK_STREAM',
> >>> protocol = 'tcp' })
> >>> @@ -1319,7 +1319,7 @@ local function lsocket_tcp_getpeername(self)
> >>> return peer.host, tostring(peer.port), peer.family:match("AF_(.*)"):lower()
> >>> end
> >>>
> >>> -local function lsocket_tcp_settimeout(self, value, mode)
> >>> +local function lsocket_tcp_settimeout(self, value, mode) -- luacheck: no unused args
> >>
> >> 10. Mode is really ignored, and this is not some kind of built-in
> >> function with 'fixed' signature. And it is not used 'virtually',
> >> when there is a variable keeping pointer at one function among
> >> many having the same signature. So what is a purpose of keeping it?
> >
> > removed mode arg
>
> Yeah, looks like it is needed, after all. Igor says, it conforms
> to http://w3.impa.br/~diego/software/luasocket/tcp.html#settimeout
> or whatever. Personally, I would remove it anyway. Because in our
> sockets and in our code globally this argument is never needed,
> and does not conform to anything.
Well, kept it as is (with removed arg)
--
sergeyb@
next prev parent reply other threads:[~2020-06-18 9:33 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 8:39 [Tarantool-patches] [PATCH 0/6] Add static analysis of Lua code in src/ and extra/ with luacheck sergeyb
2020-06-04 8:39 ` [Tarantool-patches] [PATCH 1/6] Add initial luacheck config sergeyb
2020-06-06 18:02 ` Vladislav Shpilevoy
2020-06-09 16:16 ` Sergey Bronnikov
2020-06-04 8:39 ` [Tarantool-patches] [PATCH 2/6] build: enable 'make luacheck' target sergeyb
2020-06-04 8:39 ` [Tarantool-patches] [PATCH 3/6] gitlab-ci: enable static analysis with luacheck sergeyb
2020-06-04 8:39 ` [Tarantool-patches] [PATCH 4/6] Fix luacheck warnings in extra/dist/ sergeyb
2020-06-06 18:02 ` Vladislav Shpilevoy
2020-06-09 16:17 ` Sergey Bronnikov
2020-06-19 23:15 ` Vladislav Shpilevoy
2020-07-05 16:28 ` Vladislav Shpilevoy
2020-07-12 15:37 ` Vladislav Shpilevoy
2020-07-13 10:01 ` Sergey Bronnikov
2020-06-04 8:39 ` [Tarantool-patches] [PATCH 5/6] Fix luacheck warnings in src/lua/ sergeyb
2020-06-06 18:03 ` Vladislav Shpilevoy
2020-06-11 12:00 ` Sergey Bronnikov
2020-06-11 19:52 ` Vladislav Shpilevoy
2020-06-18 9:32 ` Sergey Bronnikov [this message]
2020-06-18 9:35 ` Sergey Bronnikov
2020-06-11 17:22 ` Igor Munkin
2020-07-05 16:28 ` Vladislav Shpilevoy
2020-07-10 16:55 ` Sergey Bronnikov
2020-07-12 15:37 ` Vladislav Shpilevoy
2020-07-13 9:51 ` Sergey Bronnikov
2020-07-13 22:59 ` Vladislav Shpilevoy
2020-06-04 8:39 ` [Tarantool-patches] [PATCH 6/6] Fix luacheck warnings in src/box/lua/ sergeyb
2020-06-06 18:03 ` Vladislav Shpilevoy
2020-06-11 12:01 ` Sergey Bronnikov
2020-06-18 9:37 ` Sergey Bronnikov
2020-06-19 23:15 ` Vladislav Shpilevoy
2020-07-01 14:02 ` Sergey Bronnikov
2020-07-13 22:59 ` Vladislav Shpilevoy
2020-07-14 10:54 ` Sergey Bronnikov
2020-07-14 11:24 ` Sergey Bronnikov
2020-06-04 8:43 ` [Tarantool-patches] [PATCH 0/6] Add static analysis of Lua code in src/ and extra/ with luacheck Sergey Bronnikov
2020-06-19 23:15 ` Vladislav Shpilevoy
2020-07-13 9:53 ` Sergey Bronnikov
2020-06-04 9:04 ` Igor Munkin
2020-06-04 11:17 ` Sergey Bronnikov
2020-07-14 22:49 ` Vladislav Shpilevoy
2020-07-15 9:51 ` Kirill Yukhin
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=20200618093214.GB89732@pony.bronevichok.ru \
--to=sergeyb@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 5/6] Fix luacheck warnings in src/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