From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v8 04/14] test: fix luacheck warnings W211 in test/sql-tap
Date: Tue, 16 Feb 2021 17:09:21 +0300 [thread overview]
Message-ID: <bd06ed8a-8967-9279-1383-f9c105b79129@tarantool.org> (raw)
In-Reply-To: <77aeb2c2-7d55-f86d-5874-2300c6c975c3@tarantool.org>
Hi,
thanks for review!
On 24.01.2021 20:34, Vladislav Shpilevoy wrote:
> Thanks for the patch!
>
> See 2 comments below.
>
> On 21.01.2021 13:49, sergeyb@tarantool.org wrote:
>> From: Sergey Bronnikov <sergeyb@tarantool.org>
>>
>> W211 (Unused local variable)
>>
>> Part of #5464
>>
>> test: fix luacheck warnings W111 in test/sql-tap
>> ---
>> diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua
>> index 81b08e223..f29b26175 100755
>> --- a/test/sql-tap/e_expr.test.lua
>> +++ b/test/sql-tap/e_expr.test.lua
>> @@ -1080,7 +1080,6 @@ if (0>0) then
>> local function parameter_test(tn, sql, params, result)
>> local stmt = sql_prepare_v2("db", sql, -1)
>> for _ in X(0, "X!foreach", [=[["number name",["params"]]]=]) do
>> - local nm = sql_bind_parameter_name(stmt, number)
> 1. You should not delete the function call. It seems it must have
> had an effect on the statement object. Without this call in future it
> will be harder to understand what is missing if you delete it.
reverted hunk
>
>> X(480, "X!cmd", [=[["do_test",[["tn"],".name.",["number"]],[["list","set","",["nm"]]],["name"]]]=])
>> sql_bind_int(stmt, number, ((-1) * number))
>> end
>> diff --git a/test/sql-tap/misc1.test.lua b/test/sql-tap/misc1.test.lua
>> index 7d928bea0..b1c4f026b 100755
>> --- a/test/sql-tap/misc1.test.lua
>> +++ b/test/sql-tap/misc1.test.lua
>> @@ -726,19 +726,8 @@ test:do_execsql_test(
>> -- MUST_WORK_TEST collate
>> if 0>0 then
>> db("collate", "numeric", "numeric_collate")
>> - local function numeric_collate(lhs, rhs)
>> - if (lhs == rhs)
>> - then
>> - return 0
>> - end
>> - return X(0, "X!expr", [=[["?:",[">",["lhs"],["rhs"]],3,["-",1]]]=])
>> - end
> 2. The more I look at these db + X pairs, the more it seems like an
> artifact after TCL -> Lua conversion. I think originally it was
> supposed that the function after 'db()' should be called, and 'X'
> should execute something. Worth investigating how these tests looked
> originally. Otherwise we may delete too much and not able to resurrect
> the tests in future.
Yes, you are right regarding artifacts.
Although I would not like an idea to fix sql tests in scope of task with
luacheck
and just suppress places where we cannot fix right now.
>
> If these code blocks are important for understanding the test (which I
> don't understand now, but anyway), maybe it would better to comment
> them out instead of deleing.
>
> Or delete the entire test cases if we are not going to try to resurrect
> them, which is also fine.
next prev parent reply other threads:[~2021-02-16 14:09 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 12:49 [Tarantool-patches] [PATCH v8 00/14] Fix luacheck warnings in test/sql and test/sql-tap Sergey Bronnikov via Tarantool-patches
2021-01-21 12:49 ` [Tarantool-patches] [PATCH v8 01/14] test: fix luacheck warnings in test/sql Sergey Bronnikov via Tarantool-patches
2021-01-21 12:49 ` [Tarantool-patches] [PATCH v8 02/14] test: remove functions to open and close SQL connection Sergey Bronnikov via Tarantool-patches
2021-01-21 12:49 ` [Tarantool-patches] [PATCH v8 03/14] test: fix luacheck warnings W113 in test/sql-tap Sergey Bronnikov via Tarantool-patches
2021-01-24 17:33 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-06 17:52 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-16 12:02 ` Sergey Bronnikov via Tarantool-patches
2021-02-23 21:25 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-25 10:39 ` Sergey Bronnikov via Tarantool-patches
2021-02-26 23:42 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-27 17:53 ` Sergey Bronnikov via Tarantool-patches
2021-02-28 15:30 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-01 13:26 ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:49 ` [Tarantool-patches] [PATCH v8 04/14] test: fix luacheck warnings W211 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:34 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-16 14:09 ` Sergey Bronnikov via Tarantool-patches [this message]
2021-02-23 21:26 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-25 11:02 ` Sergey Bronnikov via Tarantool-patches
2021-02-26 23:42 ` Vladislav Shpilevoy via Tarantool-patches
2021-02-27 17:09 ` Sergey Bronnikov via Tarantool-patches
2021-02-28 15:30 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-01 13:46 ` Sergey Bronnikov via Tarantool-patches
2021-03-01 21:27 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-02 8:05 ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 05/14] test: fix luacheck warnings W212 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 06/14] test: fix laucheck warnings W213 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:35 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 16:32 ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 07/14] test: fix luacheck warnings W231 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:35 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 22:39 ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 08/14] test: fix luacheck warnings W311 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 09/14] test: fix luacheck warnings W511 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 10/14] test: fix luacheck warnings W512 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 11/14] test: fix luacheck warnings W542 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 12/14] test: fix luacheck warnings W612, W613, W614 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:36 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 16:23 ` Sergey Bronnikov via Tarantool-patches
2021-01-29 21:50 ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 13/14] test: fix luacheck warnings W621 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:37 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 16:11 ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 14/14] luacheck: add issues for suppressed warnings Sergey Bronnikov via Tarantool-patches
2021-01-24 17:37 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 16:13 ` Sergey Bronnikov via Tarantool-patches
2021-03-01 21:37 ` [Tarantool-patches] [PATCH v8 00/14] Fix luacheck warnings in test/sql and test/sql-tap Vladislav Shpilevoy via Tarantool-patches
2021-03-02 9:47 ` 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=bd06ed8a-8967-9279-1383-f9c105b79129@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v8 04/14] test: fix luacheck warnings W211 in test/sql-tap' \
/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