[Tarantool-patches] [PATCH] app/argparse: expect no value for a boolean option
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Wed Nov 13 00:33:35 MSK 2019
On 12/11/2019 22:03, Alexander Turenko wrote:
>>>>> + -- Don't consume a value after a 'boolean' or
>>>>> + -- 'boolean+' argument.
>>>>> + if lookup[command] ~= 'boolean' and
>>>>> + lookup[command] ~= 'boolean+' then
>>>>
>>>> 2. Something is wrong with the indentation.
>>>
>>> Let's consider three variants of splitting long if conditions:
>>>
>>> | if long_cond1 or
>>> | long_cond2 then
>>> | <...>
>>> | end
>>>
>>> | if long_cond1 or
>>> | long_cond2 then
>>> | <...>
>>> | end
>>>
>>> | if long_cond1 or
>>> | long_cond2 then
>>> | <...>
>>> | end
>>>
>>> As I see the first and the second variants are used across tarantool's
>>> built-in Lua code. You are right, third one, which I personally prefer,
>>> is not used within the project.
>>
>> There is no options. The first is the only standard in our code. If the
>> second one is used somewhere, then it is incorrect, or is a third-party
>> library with own code style.
>
> I see no mentions about this (at least there is nothing about this in
> our Lua Style Guide on the website) as well as I see no dominant style
> across our Lua code.
>
> What is the source of your information?
>
I remember, that I tried once to use a not aligned multiline 'if' and
was said/emailed by you, or Roman T., or Vladimir D., or by Kostja O.,
that in Lua we need to stick to the same rules as in C about alignment.
More information about the Tarantool-patches
mailing list