[Tarantool-patches] [PATCH v6 04/25] Fix luacheck warnings in extra/dist/tarantoolctl.in

Alexander Turenko alexander.turenko at tarantool.org
Mon Jun 1 17:10:05 MSK 2020


>  local function rocks()
>      local cfg = require("luarocks.core.cfg")
>      cfg.init()
>      local util = require("luarocks.util")
>      local command_line = require("luarocks.cmd")
>      -- Tweak help messages
> -    util.see_help = function(command, program)
> +    util.see_help = function()
>          -- TODO: print extended help message here
>          return "See Tarantool documentation for help."
>      end

Those argument names looks useful: one don't need to find the original
function from luarocks to understand that the message may be different
for each command. Those arguments hold the function contract and so
informative.

I would ignore luacheck warning rather then remove the arguments.
luacheck should not push us to make the code less informative.

NB: When add inline ignore rules for luacheck I prefer to use a text
name of a warning rather than its number (or just
'-- luacheck: ignore'): it is more readable.  This partcular case would
be '-- luacheck: no unused args'.

WBR, Alexander Turenko.


More information about the Tarantool-patches mailing list