Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin <imun@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: o.piskunov@tarantool.org, tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/6] Fix luacheck warnings in src/lua/
Date: Wed, 15 Apr 2020 23:51:54 +0300	[thread overview]
Message-ID: <20200415205154.GG8314@tarantool.org> (raw)
In-Reply-To: <ce1a44fe-80a5-cc3c-eb26-8c8b62bfc307@tarantool.org>

Vlad,

Thanks for the fixes!

On 15.04.20, Vladislav Shpilevoy wrote:
> Thanks for the patch!
> 
> Consider more fixes below and on the branch in a separate commit.
> That allowed to remove some warning mutes from the luacheck
> config.
> 
> ====================
> 
>     Review fixes: src/lua
> 
> diff --git a/src/lua/fiber.lua b/src/lua/fiber.lua
> index 89c17f63d..692408e54 100644
> --- a/src/lua/fiber.lua
> +++ b/src/lua/fiber.lua
> @@ -40,7 +40,7 @@ fiber.stall = nil
>  
>  local worker_next_task = nil
>  local worker_last_task = nil

It looks like this assignment can also be omitted (anyway luacheck also
reports it as a warning).

> -local worker_fiber = nil
> +local worker_fiber
>  
>  --
>  -- Worker is a singleton fiber for not urgent delayed execution of

<snipped>

> diff --git a/src/lua/msgpackffi.lua b/src/lua/msgpackffi.lua
> index 9105c3f23..793f47854 100644
> --- a/src/lua/msgpackffi.lua
> +++ b/src/lua/msgpackffi.lua
> @@ -501,7 +501,11 @@ local ext_decoder = {
>      -- MP_DECIMAL
>      [1] = function(data, len) local num = ffi.new("decimal_t") builtin.decimal_unpack(data, len, num) return num end,

I guess MP_DECIMAL decoder can also be transformed to multiline function.

>      -- MP_UUID
> -    [2] = function(data, len) local uuid = ffi.new("struct tt_uuid") builtin.uuid_unpack(data, len, uuid) return uuid end,
> +    [2] = function(data, len)
> +        local uuid = ffi.new("struct tt_uuid")
> +        builtin.uuid_unpack(data, len, uuid)
> +        return uuid
> +    end,
>  }
>  
>  local function decode_ext(data)

-- 
Best regards,
IM

  reply	other threads:[~2020-04-15 20:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14  7:55 [Tarantool-patches] [PATCH v3 0/6] Add static analysis with luacheck Sergey Bronnikov
2020-04-14  7:56 ` [Tarantool-patches] [PATCH 1/6] Fix luacheck warnings in src/lua/ Sergey Bronnikov
2020-04-14 23:29   ` Vladislav Shpilevoy
2020-04-15 20:51     ` Igor Munkin [this message]
2020-04-15 21:40       ` Vladislav Shpilevoy
2020-04-17  9:07       ` Sergey Bronnikov
2020-04-17  9:09     ` Sergey Bronnikov
2020-04-15 20:51   ` Igor Munkin
2020-04-15 21:46     ` Vladislav Shpilevoy
2020-04-16 13:52       ` Igor Munkin
2020-04-17  9:26     ` Sergey Bronnikov
2020-04-17 12:13       ` Igor Munkin
2020-04-14  7:57 ` [Tarantool-patches] [PATCH 2/6] Fix luacheck warnings in test/ Sergey Bronnikov
2020-04-14 23:29   ` Vladislav Shpilevoy
2020-04-17 12:05     ` Igor Munkin
2020-04-17 19:51       ` Sergey Bronnikov
2020-04-17 19:47     ` Sergey Bronnikov
2020-04-16 13:43   ` Igor Munkin
2020-04-14  7:57 ` [Tarantool-patches] [PATCH 3/6] Fix luacheck warnings in src/box/lua/ Sergey Bronnikov
2020-04-14 23:30   ` Vladislav Shpilevoy
2020-04-14  7:58 ` [Tarantool-patches] [PATCH 4/6] Fix luacheck warnings in extra/dist/tarantoolctl.in Sergey Bronnikov
2020-04-14 23:30   ` Vladislav Shpilevoy
2020-04-15 15:35   ` Igor Munkin
2020-04-14  8:01 ` [Tarantool-patches] [PATCH 5/6] Add luacheck config Sergey Bronnikov
2020-04-14 23:30   ` Vladislav Shpilevoy
2020-04-14  8:01 ` [Tarantool-patches] [PATCH 6/6] gitlab-ci: enable static analysis with luacheck Sergey Bronnikov
2020-04-14 23:30 ` [Tarantool-patches] [PATCH v3 7/6] schema: fix index promotion to functional index Vladislav Shpilevoy
2020-04-14 23:30 ` [Tarantool-patches] [PATCH v3 8/6] schema: fix internal symbols dangling in _G Vladislav Shpilevoy

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=20200415205154.GG8314@tarantool.org \
    --to=imun@tarantool.org \
    --cc=o.piskunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/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