[Tarantool-patches] [PATCH 1/3] luacheck: fix warnings in test/box
Sergey Bronnikov
sergeyb at tarantool.org
Wed Jan 13 10:58:57 MSK 2021
On 12.01.2021 18:26, Sergey Bronnikov via Tarantool-patches wrote:
> Thanks for review!
>
> On 11.01.2021 20:52, Vladislav Shpilevoy wrote:
>> Hi! Thanks for the patch!
>>
>> See 2 comments below.
>>
>>> diff --git a/.luacheckrc b/.luacheckrc
>>> index 4b829f3dc..17cff8671 100644
>>> --- a/.luacheckrc
>>> +++ b/.luacheckrc
>>> @@ -102,3 +108,53 @@ files["src/box/lua/console.lua"] = {
>>> "212",
>>> }
>>> }
>>> +files["test/box/box.lua"] = {
>>> + globals = {
>>> + "cfg_filter",
>>> + "sorted",
>>> + "iproto_request",
>>> + }
>>> +}
>>> +files["test/box/lua/push.lua"] = {
>>> + globals = {"push_collection"}
>>> +}
>>> +files["test/box/lua/index_random_test.lua"] = {
>>> + globals = {"index_random_test"}
>>> +}
>>> +files["test/box/lua/utils.lua"] = {
>>> + globals = {
>>> + "arithmetic",
>>> + "check_space",
>>> + "create_iterator",
>>> + "iterate",
>>> + "setmap",
>>> + "sort",
>>> + "space_field_types",
>>> + "space_bsize",
>>> + "table_generate",
>>> + "table_shuffle",
>>> + "tuple_to_string",
>> 1. All these functions are returned by the module. It means,
>> they are supposed to be used like this:
>>
>> utils = require('utils.lua')
>> utils.setmap()
>> utils.space_bsize()
>> -- etc
>>
>> This in turn means you need to make them all 'local' in utils.lua.
>> I did it, and the tests pass. Also some of these functions are
>> probably unused, but I didn't check.
>>
>> The same for identifier.lua below.
>
> - removed some functions from interfaces and their implementations
reverted change because removed functions are used by other suites (for
example vinyl)
<snipped>
More information about the Tarantool-patches
mailing list