[Tarantool-patches] [PATCH v6 08/25] Fix luacheck warnings in test/app-tap

Alexander Turenko alexander.turenko at tarantool.org
Mon Jun 1 20:13:56 MSK 2020


> > > -local function execute_and_verify(test, client, input, exp_output, name)
> > > -    test:test(name, function(test)
> > > +local function execute_and_verify(testcase, client, input, exp_output, name)
> > > +    testcase:test(name, function(test)
> > 
> > Please, don't forbid redefinitions. I often use it for 'standard' names
> > like 'opts', 'ok', 'err', 'test'. It allows to write code blocks in the
> > same style:
> > 
> >  | local ok, err = <...>
> >  | <...>
> >  | local ok, err = <...>
> > 
> 
> I have no objections regarding this proposal, only two nits:
> * Those suppressions should be enabled source-wide *only and only when*
>   all unintentional occurences or the ones masking bugs (if we found
>   such) are fixed. Otherwise I see no sence in enabling luacheck.

Aren't real bugfixes (that actually changes present behaviour) separated
from style changes?

Don't get what you meant with 'unintentional occurences': if it is not a
bug and not a code style violation, than it it does not look as
something that should be fixed. But if there is an example, where
luacheck reveals a place that is worth to change for, say, readability,
then okay.

I bet a beer that this certain warning does not give us any real bug.

The main advantage of luacheck is preventing some kinds of typos: say, a
typo in a function name in some failure branch, which is not covered by
tests. The tool is definitely useful without the redefinition warning.

WBR, Alexander Turenko. 


More information about the Tarantool-patches mailing list