From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: sergeyb@tarantool.org, tarantool-patches@dev.tarantool.org,
imun@tarantool.org
Cc: alexander.turenko@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 5/6] Fix luacheck warnings in src/lua/
Date: Tue, 14 Jul 2020 00:59:09 +0200 [thread overview]
Message-ID: <eaceddea-5223-2cf5-4915-05bce80569b2@tarantool.org> (raw)
In-Reply-To: <c5f236c93b251b6a19eeb16c20a31adfc4f95b3e.1591259297.git.sergeyb@tarantool.org>
Hi! Thanks for the fixes!
I've force pushed the following changes:
====================
diff --git a/src/lua/fio.lua b/src/lua/fio.lua
index b31311b7b..954c44cdf 100644
--- a/src/lua/fio.lua
+++ b/src/lua/fio.lua
@@ -378,7 +378,7 @@ fio.mktree = function(path, mode)
end
path = fio.abspath(path)
- path = string.gsub(path, '^/', '')
+ local path = string.gsub(path, '^/', '')
====================
As I pointed out already, all kinds of redefinition warnings
were disabled. No need to touch them.
====================
local dirs = string.split(path, "/")
local current_dir = "/"
diff --git a/src/lua/init.lua b/src/lua/init.lua
index 280ecc03f..9e3c813c3 100644
--- a/src/lua/init.lua
+++ b/src/lua/init.lua
@@ -80,7 +80,7 @@ dostring = function(s, ...)
end
local fiber = require("fiber")
-local exit = function(code)
+local function exit(code)
====================
Easier to grep, and just looks more natural.
====================
code = (type(code) == 'number') and code or 0
ffi.C.tarantool_exit(code)
-- Make sure we yield even if the code after
diff --git a/src/lua/log.lua b/src/lua/log.lua
index bf0e4283c..cfd83f592 100644
--- a/src/lua/log.lua
+++ b/src/lua/log.lua
@@ -459,7 +459,7 @@ local function reload_cfg(cfg)
end
-- Load or reload configuration via log.cfg({}) call.
-local function load_cfg(oldcf, cfg) -- luacheck: no unused args
+local function load_cfg(self, cfg)
====================
The function is a __call method of the configuration table.
So the first argument is always self. And it is legal to
rename it. Also this is preferable since we force 'self' as
a special name in our luacheck config.
====================
cfg = cfg or {}
-- log option might be zero length string, which
next prev parent reply other threads:[~2020-07-13 22:59 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
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 [this message]
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=eaceddea-5223-2cf5-4915-05bce80569b2@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=imun@tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=tarantool-patches@dev.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