From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id C514A70202; Wed, 24 Feb 2021 00:26:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C514A70202 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614115593; bh=9DfkC7Uy+ijVKiranlJqcsvTPQlgS6eD+zvm7FaTU/A=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=TowypOM+KxU8xU4fKNUObpxsgh+TVTK1JMjak+O2enb+HJE/labVzGLXNEwFD/jq9 7uAkIJr+STzyp+h+2cGd2tKi9EfFW8Zpe9NDfD013RrwquoX6/Pcg+V+5jbV/blQTp 2ITQ+40TTbZa3cal45eQg8xztxPPErX7o1MI3e18= Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [217.69.128.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id EC6EB70202 for ; Wed, 24 Feb 2021 00:26:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EC6EB70202 Received: by smtp54.i.mail.ru with esmtpa (envelope-from ) id 1lEfBy-0000az-AE; Wed, 24 Feb 2021 00:26:02 +0300 To: sergeyb@tarantool.org, tarantool-patches@dev.tarantool.org References: Message-ID: <68a02630-efac-0e6c-d6ab-0af18d0192c1@tarantool.org> Date: Tue, 23 Feb 2021 22:26:01 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD975C3EC174F5669229511437AA01F46811CFCF616A939B362182A05F538085040F4CF97346EB0D0D3519E97D485ADB97B0DE494908AB1C212D9CF1FDD36E6D678 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE737AE489DBC023F2AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D07BBD2EBFB7BF888638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCE3B71345910BC919A7B2659CF5ACC71A068CDCA8B4F98B8E389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0B27420F9988F54058941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B669875440691429F6CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249F99AF4D8A163DCE876E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B0D761CB2DE3B11193AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE7B2B7C64F398C741067F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C3517AAFC1974B5A1735872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9AE7E30DF62CE24E4E5BFE6E7EFDEDCD789D4C264860C145E X-B7AD71C0: 14C14B24D00AF5AC321EF223B8115265C69B993890792DF82CDD5689AFBDA7A24A6D60772A99906F8E1CD14B953EB46D2837CF256D238908355D89D7DBCDD132 X-C1DE0DAB: 0D63561A33F958A59C83F8D6BF53199EA87CA1711E6D3DE5C067752A9CD45E31D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7557E988E9157162368E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3458239C6F30CE7ACFF9709E90E12EB373D7712040D428FE37CB8229B7681400BD3156A007F6D0F5211D7E09C32AA3244C60124652F3FFAEC79D538E87C11798E0F522A1CF68F4BE05729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojyK6JYJ15DtJU6827WkefnA== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA311007457E538FC37C89DD82FFCED8BBB642392C16B725545C9607784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v8 04/14] test: fix luacheck warnings W211 in test/sql-tap X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! See 5 comments below. > diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua > index 37a7b7177..046ed8711 100755 > --- a/test/sql-tap/e_expr.test.lua > +++ b/test/sql-tap/e_expr.test.lua > @@ -1087,7 +1087,7 @@ if (0>0) then > local number = nil > local stmt = sql_prepare_v2(sql, -1) > for _ in X(0, "X!foreach", [=[["number name",["params"]]]=]) do > - local nm = sql_bind_parameter_name(stmt, number) > + local nm = sql_bind_parameter_name(stmt, number) -- luacheck: no unused 1. Why do you need 'nm' if it is unused? You don't need to drop the entire line. Just delete 'nm' variable and leave the function call without saving its result to anything. The same below for 'rc' and 'sql_finalize()'. > 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/func.test.lua b/test/sql-tap/func.test.lua > index 9cd517673..5dab23007 100755 > --- a/test/sql-tap/func.test.lua > +++ b/test/sql-tap/func.test.lua > @@ -1382,7 +1380,6 @@ test:do_execsql_test( > }) > > db("cache", "flush") > -V = "three" 2. 'V' is supposed to be a variable. It is used in the queries in the surrounding code. Please, don't delete parts of the tests. It will not make it simpler to restore the context later. The tests in this patchset either must be deleted, or resurrected, or hacked to keep their context and not fail luacheck. What to choose - depends on individual tests. Here clearly we need to keep 'V'. Try to make another pass of self-review to locate more of such test-"breaking" changes. > diff --git a/test/sql-tap/selectA.test.lua b/test/sql-tap/selectA.test.lua > index a608ab093..db4d03985 100755 > --- a/test/sql-tap/selectA.test.lua > +++ b/test/sql-tap/selectA.test.lua > @@ -2359,9 +2357,6 @@ test:do_execsql_test( > if (0 > 0) > then > end > -local function f(args) > - return 1 > -end 3. It seems the function is supposed to be somehow used a few lines below. Please, keep it. > -- TODO stored procedures are not supported by now > --db("func", "f", "f")> diff --git a/test/sql-tap/sort.test.lua b/test/sql-tap/sort.test.lua > index 1cf0d14a8..0de598969 100755 > --- a/test/sql-tap/sort.test.lua > +++ b/test/sql-tap/sort.test.lua > @@ -802,7 +801,6 @@ box.internal.sql_create_function("cksum", cksum) > "sort-14."..tn, > function() > sql_test_control("sql_TESTCTRL_SORTER_MMAP", "db", mmap_limit) > - local prev = "" 4. Prev is supposed to be used in the request on the next line. It has `$prev` expression inside. > X(536, "X!cmd", [=[["db","eval"," SELECT * FROM t11 ORDER BY b ","\n if {$b != [cksum $a]} {error \"checksum failed\"}\n if {[string compare $b $prev] < 0} {error \"sort failed\"}\n set prev $b\n "]]=]) > return X(541, "X!cmd", [=[["set","",""]]=]) > end, { > diff --git a/test/sql-tap/trigger1.test.lua b/test/sql-tap/trigger1.test.lua > index 8224ef1ec..0efdd21bc 100755 > --- a/test/sql-tap/trigger1.test.lua > +++ b/test/sql-tap/trigger1.test.lua > @@ -482,8 +482,6 @@ test:execsql [[ > -- trigger works. Then drop the trigger. Make sure the table is > -- still there. > -- > -local view_v1 = "view v1" 5. The variable is "used" in some of the commented out tests below. > - > > -- do_test trigger1-6.1 { > -- execsql {SELECT type, name FROM sql_master}