From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] app/argparse: expect no value for a boolean option
Date: Tue, 12 Nov 2019 22:33:35 +0100 [thread overview]
Message-ID: <7d91f7dc-99ac-5c05-8ac1-e256f8dde393@tarantool.org> (raw)
In-Reply-To: <20191112210318.mv7pfsg3dvyhpxng@tkn_work_nb>
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.
next prev parent reply other threads:[~2019-11-12 21:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-09 0:39 Alexander Turenko
2019-11-11 22:25 ` Vladislav Shpilevoy
2019-11-12 17:40 ` Alexander Turenko
2019-11-12 20:41 ` Vladislav Shpilevoy
2019-11-12 21:03 ` Alexander Turenko
2019-11-12 21:33 ` Vladislav Shpilevoy [this message]
2019-11-13 4:33 ` Konstantin Osipov
2019-11-13 8:40 ` Alexander Turenko
2019-11-15 0:18 ` Alexander Turenko
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=7d91f7dc-99ac-5c05-8ac1-e256f8dde393@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] app/argparse: expect no value for a boolean option' \
/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