From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (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 82BFB4696C3 for ; Thu, 16 Apr 2020 00:47:00 +0300 (MSK) References: <56290abaaa1850a223eac0fa7165bcb9f890501d.1586849129.git.sergeyb@tarantool.org> <20200415205102.GF8314@tarantool.org> From: Vladislav Shpilevoy Message-ID: <7f693dc4-5103-1481-082c-802f96c722cd@tarantool.org> Date: Wed, 15 Apr 2020 23:46:58 +0200 MIME-Version: 1.0 In-Reply-To: <20200415205102.GF8314@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 1/6] Fix luacheck warnings in src/lua/ List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin , Sergey Bronnikov Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org >> @@ -428,7 +428,7 @@ local public_methods = { >> } >> >> local module_mt = { >> - __serialize = function(s) >> + __serialize = function() >> return public_methods >> end, >> __index = public_methods > > I see no reasons to leave other W212[unused argument self] occurences. > Here is a diff: > > ================================================================================ > > diff --git a/src/lua/crypto.lua b/src/lua/crypto.lua > index c0eb0d303..6a7ee53f0 100644 > --- a/src/lua/crypto.lua > +++ b/src/lua/crypto.lua > @@ -318,7 +318,7 @@ for class, digest in pairs(digests) do > digest_api[class] = setmetatable({ > new = function () return digest_new(digest) end > }, { > - __call = function (self, str) > + __call = function (_, str) I would better avoid such changes. They make it harder to understand what the function takes as arguments. Luacheck in these cases basically dictates to us how to name variables, because nothing is removed here. The variable is just renamed to a less understandable name.