From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Serge Petrenko <sergepetrenko@tarantool.org>,
tarantool-patches@dev.tarantool.org
Cc: v.shpilevoy@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/2] luacheck: fix warnings in test/box
Date: Fri, 15 Jan 2021 15:54:35 +0300 [thread overview]
Message-ID: <ceeb4d04-27f5-1e0b-2940-55f8ff3c751a@tarantool.org> (raw)
In-Reply-To: <b4e4545d-7e03-a7f8-fb3d-6b0b500ca92f@tarantool.org>
Thanks for review!
On 15.01.2021 15:39, Serge Petrenko wrote:
>
>
> 15.01.2021 14:22, sergeyb@tarantool.org пишет:
>> From: Sergey Bronnikov <sergeyb@tarantool.org>
>>
>> Follows up #5455
>> ---
>
> Thanks for the patch!
> LGTM.
> One question below.
>
>
>> test/box/gh-5304-insert_during_recovery.lua | 10 +++++-----
>> test/box/gh-5304-replace_during_recovery.lua | 1 +
>> 2 files changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/test/box/gh-5304-insert_during_recovery.lua
>> b/test/box/gh-5304-insert_during_recovery.lua
>> index ac6eef342..c8b6c5cfb 100644
>> --- a/test/box/gh-5304-insert_during_recovery.lua
>> +++ b/test/box/gh-5304-insert_during_recovery.lua
>> @@ -1,24 +1,24 @@
>> #!/usr/bin/env tarantool
>> -function none(old_space, new_space)
>> +local function none(old_space, new_space) -- luacheck: ignore
>
> What's "luacheck: ignore" comment for? Haven't you fixed the warning
> already by introducing `local` ?
>
There are two warnings here. First one about global scope, that was
fixed with "local" and second one
about unused parameters, that was suppressed by "luacheck: ignore".
>> end
>> -function trigger_replace(old_space, new_space)
>> +local function trigger_replace(old_space, new_space) -- luacheck:
>> ignore
>> box.space.temp:replace({1})
>> box.space.loc:replace({1})
>> end
>> -function trigger_insert(old_space, new_space)
>> +local function trigger_insert(old_space, new_space) -- luacheck: ignore
>> box.space.temp:insert({1})
>> box.space.loc:insert({1})
>> end
>> -function trigger_upsert(old_space, new_space)
>> +local function trigger_upsert(old_space, new_space) -- luacheck: ignore
>> box.space.temp:upsert({1}, {{'=', 1, 4}})
>> box.space.loc:upsert({1}, {{'=', 1, 4}})
>> end
>> -trigger = nil
>> +local trigger = nil
>> if arg[1] == 'none' then
>> trigger = none
>> diff --git a/test/box/gh-5304-replace_during_recovery.lua
>> b/test/box/gh-5304-replace_during_recovery.lua
>> index d6a7099ac..8b9a657af 100644
>> --- a/test/box/gh-5304-replace_during_recovery.lua
>> +++ b/test/box/gh-5304-replace_during_recovery.lua
>> @@ -2,6 +2,7 @@
>> if arg[1] == 'replace' then
>> box.ctl.on_schema_init(function()
>> + -- luacheck: ignore
>> box.space._index:on_replace(function(old_space, new_space)
>> if new_space[1] == 512 then
>> box.space.test:on_replace(function(old_tup, new_tup)
>
next prev parent reply other threads:[~2021-01-15 12:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 11:22 [Tarantool-patches] [PATCH 0/2] Fix new luacheck warnings in test/box-tap and test/box Sergey Bronnikov via Tarantool-patches
2021-01-15 11:22 ` [Tarantool-patches] [PATCH 1/2] luacheck: fix warnings in test/box Sergey Bronnikov via Tarantool-patches
2021-01-15 12:39 ` Serge Petrenko via Tarantool-patches
2021-01-15 12:54 ` Sergey Bronnikov via Tarantool-patches [this message]
2021-01-15 13:02 ` Serge Petrenko via Tarantool-patches
2021-01-15 20:32 ` Igor Munkin via Tarantool-patches
2021-01-15 11:22 ` [Tarantool-patches] [PATCH 2/2] luacheck: fix warnings in test/box-tap Sergey Bronnikov via Tarantool-patches
2021-01-15 12:40 ` Serge Petrenko via Tarantool-patches
2021-01-15 12:56 ` Sergey Bronnikov via Tarantool-patches
2021-01-15 13:03 ` Serge Petrenko via Tarantool-patches
2021-01-15 14:30 ` [Tarantool-patches] [PATCH 0/2] Fix new luacheck warnings in test/box-tap and test/box Kirill Yukhin via Tarantool-patches
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=ceeb4d04-27f5-1e0b-2940-55f8ff3c751a@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=sergepetrenko@tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 1/2] luacheck: fix warnings in test/box' \
/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