[Tarantool-patches] [PATCH 1/2] luacheck: fix warnings in test/box

Igor Munkin imun at tarantool.org
Fri Jan 15 23:32:33 MSK 2021


Sergey,

Even I'm a bit late (Kirill is the fastest hand in the wild west^W^W
Tarantool), I have a single nit regarding Serge question.

On 15.01.21, Sergey Bronnikov via Tarantool-patches wrote:
> Thanks for review!
> 
> On 15.01.2021 15:39, Serge Petrenko wrote:
> >

<snipped>

> >> diff --git a/test/box/gh-5304-insert_during_recovery.lua 
> >> b/test/box/gh-5304-insert_during_recovery.lua
> >> index ac6eef342..c8b6c5cfb 100644
> >> --- a/test/box/gh-5304-insert_during_recovery.lua
> >> +++ b/test/box/gh-5304-insert_during_recovery.lua
> >> @@ -1,24 +1,24 @@
> >>   #!/usr/bin/env tarantool
> >>   -function none(old_space, new_space)
> >> +local function none(old_space, new_space) -- luacheck: ignore
> >
> > What's "luacheck: ignore" comment for? Haven't you fixed the warning 
> > already by introducing `local` ?
> >
> There are two warnings here. First one about global scope, that was 
> fixed with "local" and second one
> 
> about unused parameters, that was suppressed by "luacheck: ignore".

AFAICS there is a specific ignore reason for inline suppressions such as
"no unused args" that is used in other Lua sources repo-wide (just grep for
it). You can also see other available inline reasons here[1].

> 
> >>   end

<snipped>

> >

[1]: https://luacheck.readthedocs.io/en/stable/inline.html

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list